I know how to do a git rebase from the command line, but how do you do it with the official git-gui?
Git rebase interactive in the console To use git rebase in the console with a list of commits you can choose, edit or drop in the rebase: Enter git rebase -i HEAD~5 with the last number being any number of commits from the most recent backwards you want to review. In vim, press esc , then i to start editing the test.
Additional rebase commandsgit rebase -- p leaves the commit as is. It will not modify the commit's message or content and will still be an individual commit in the branches history. git rebase -- x during playback executes a command line shell script on each marked commit.
Add this to the .gitconfig
file in your home directory to add rebase commands to the Tools menu:
[guitool "Rebase onto..."] cmd = git rebase $REVISION revprompt = yes [guitool "Rebase/Continue"] cmd = git rebase --continue [guitool "Rebase/Skip"] cmd = git rebase --skip [guitool "Rebase/Abort"] cmd = git rebase --abort [guitool "Pull with Rebase"] cmd = git pull --rebase
In git-gui
:
Tools -> Add
and then enter a custom command i.e. git rebase master
. ~/.gitconfig
for you, as @Ted-Percival mentioned in his answer).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With