ya55en / git-goodies

Useful git-related add-ons and configs
MIT License
0 stars 0 forks source link

Support `rebase in progress` status #6

Open ya55en opened 4 years ago

ya55en commented 4 years ago

Support the repo state after git rebase master when there were conflicts.

The output of git status:

rebase in progress; onto 6238478
You are currently rebasing branch 'some-branch-name' on '6238478'.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   src/project/module1.py
    modified:   src/project/module2.py
    modified:   src/project/package/module3.py

Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

    both modified:   src/project/model/features.py
ya55en commented 2 years ago

Another example (git version 2.34.1):

(.venv) user@host:~/project/path$ (�רD� ꔷ) git status
interactive rebase in progress; onto 1234abc
Last command done (1 command done):
   pick 3210bca Show original document
No commands remaining.
You are currently rebasing branch 'show-original-document' on '1234abc'.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Unmerged paths:
  (use "git restore --staged <file>..." to unstage)
  (use "git add <file>..." to mark resolution)
    both modified:   .dot.file
    both added:      poroject/module1.py
    both modified:   poroject/module2.py

no changes added to commit (use "git add" and/or "git commit -a")