Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonashaag/git-smart-pull
Automatically rebase-pull if possible, otherwise merge-pull
https://github.com/jonashaag/git-smart-pull
Last synced: 24 days ago
JSON representation
Automatically rebase-pull if possible, otherwise merge-pull
- Host: GitHub
- URL: https://github.com/jonashaag/git-smart-pull
- Owner: jonashaag
- Created: 2024-07-18T06:17:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-18T06:58:54.000Z (4 months ago)
- Last Synced: 2024-07-18T08:35:52.447Z (4 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `git smart-pull`
Automatically use rebase pulls when possible, and fall back to merge pulls when necessary.
`smart-pull` tries the following pull strategies in order:
1. Fast-forward
```
❯ git smart-pull
[smart-pull] Attempting fast-forward pull
Updating 9eb3fbb..0dacec5
Fast-forward
klaus/contrib/app_args.py | 11 ++++++++++-
setup.py | 13 -------------
2 files changed, 10 insertions(+), 14 deletions(-)
[smart-pull] Fast-forward pull succeeded.
```
2. Rebase, if there are no conflicts
```
❯ git smart-pull
[smart-pull] Attempting fast-forward pull
[smart-pull] Fast-forward pull failed.
[smart-pull] Checking if we can rebase without conflict.
[smart-pull] Can rebase without conflict.
[smart-pull] Will pull with rebase.
Switched to branch 'master'
Your branch and 'origin/master' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" if you want to integrate the remote branch with yours)
Successfully rebased and updated refs/heads/master.
```
3. Rebase or merge, if there are any conflicts
```
❯ git smart-pull
[smart-pull] Attempting fast-forward pull
[smart-pull] Fast-forward pull failed.
[smart-pull] Checking if we can rebase without conflict.
[smart-pull] Cannot rebase without conflict. Conflicted files:
[smart-pull] CHANGELOG.rst
Select pull method: [m]erge / [r]ebase / [n]one
```