Tool to list up remote branches that conflict with the current working copy.
Project description
# git-whatsup
List up remote branches that conflict with the current working copy.
Requires Python 3.5+ and pygit2.
```
$ brew install libgit2
$ pip install git-whatsup
$ git-whatsup
conflicts with me
------------------------------------------------------------
origin/find-the-leaks (M!)
spec/spec_helper.rb C
app/assets/cactus.png deleted by us
```
How it works:
- Create a commit on top of the current index with all unstaged changes
- Tag the commit with `whatsup-with-me`
- For each remote branch,
- Try merging with `whatsup-with-me`
- If it conflicts, try merging with `origin/master`
- Based on the results, classify into roughly these categories:
no conflicts, conflicts with my changes, or conflicts with just master
- Output those that conflict with my changes
- Output conflicting diffs too if requested
## Usage
```
$ git-whatsup --help
usage: git-whatsup [-h] [--remote REMOTE_NAME] [--master BRANCH_NAME]
[--branch BRANCH_NAME] [--all] [--diff]
[--format {plain,json}]
[repo_path]
List up remote branches that conflict with the current working copy.
positional arguments:
repo_path target Git repository
optional arguments:
-h, --help show this help message and exit
--remote REMOTE_NAME compare against branches in this remote
--master BRANCH_NAME master branch name
--branch BRANCH_NAME, -b BRANCH_NAME
branches to check. by default, all branches are
checked
--all, -a output all statuses if output format is `plain`
--diff, -d output diffs if output format is `plain`
--format {plain,json}, -f {plain,json}
json always includes diffs
```
## Assumptions and caveats
- Remote branches in your local clone are assumed to be up-to-date (`git fetch` has been run)
- Consider this alpha software
List up remote branches that conflict with the current working copy.
Requires Python 3.5+ and pygit2.
```
$ brew install libgit2
$ pip install git-whatsup
$ git-whatsup
conflicts with me
------------------------------------------------------------
origin/find-the-leaks (M!)
spec/spec_helper.rb C
app/assets/cactus.png deleted by us
```
How it works:
- Create a commit on top of the current index with all unstaged changes
- Tag the commit with `whatsup-with-me`
- For each remote branch,
- Try merging with `whatsup-with-me`
- If it conflicts, try merging with `origin/master`
- Based on the results, classify into roughly these categories:
no conflicts, conflicts with my changes, or conflicts with just master
- Output those that conflict with my changes
- Output conflicting diffs too if requested
## Usage
```
$ git-whatsup --help
usage: git-whatsup [-h] [--remote REMOTE_NAME] [--master BRANCH_NAME]
[--branch BRANCH_NAME] [--all] [--diff]
[--format {plain,json}]
[repo_path]
List up remote branches that conflict with the current working copy.
positional arguments:
repo_path target Git repository
optional arguments:
-h, --help show this help message and exit
--remote REMOTE_NAME compare against branches in this remote
--master BRANCH_NAME master branch name
--branch BRANCH_NAME, -b BRANCH_NAME
branches to check. by default, all branches are
checked
--all, -a output all statuses if output format is `plain`
--diff, -d output diffs if output format is `plain`
--format {plain,json}, -f {plain,json}
json always includes diffs
```
## Assumptions and caveats
- Remote branches in your local clone are assumed to be up-to-date (`git fetch` has been run)
- Consider this alpha software
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
git-whatsup-0.1.0.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file git-whatsup-0.1.0.tar.gz
.
File metadata
- Download URL: git-whatsup-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c267ced7e81594fa6e91174320c3ac92724f733f5a67f87af60c89d8675d32d |
|
MD5 | 0385664754d5b6b98ca230a75521e46e |
|
BLAKE2b-256 | 64e6fa7cfd18b95e58899143def467555c2d63f063f4dba39c350eb05500c94e |
File details
Details for the file git_whatsup-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: git_whatsup-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c14fe94557bcf4bca11cb936a8c1ace74ca6b8c12be46e00e498682def973a5 |
|
MD5 | 60504b014987d93e38a8e71a1e9f4854 |
|
BLAKE2b-256 | 1c5161ec9aced914c99a031885259fc41583a6f435b4dad74e129dd9f682110d |