Color highlighting works for everything else in git (e.g. status, log, branch name etc). Just not when I do an interactive rebase.
This sort of makes sense because interactive rebase happens within a text editor, where other interactions are just terminal output. But I think I remember highlighting working by default in git bash on windows, so there must be a way on mac.
I would like it to color code pick vs squash vs fixup etc.
As a shot in the dark, I tried setting color param interactive
to true
and auto
in my ~/.gitconfig
, and tried supplying some color values explicitly, but this had no effect:
[color]
branch = auto
diff = auto
status = auto
ui = auto
interactive = true
[color "interactive"]
pick = yellow
squash = green
fixup = cyan
Changing Multiple Commit Messages You can run rebase interactively by adding the -i option to git rebase . You must indicate how far back you want to rewrite commits by telling the command which commit to rebase onto.
you may just run git pull --rebase origin stagingonly to rebase all your commits onto latest state of remote version stagingonly branch. It will look like you just created your feature branch and put all you commits after latest ones from team branch.
On the command line, navigate to the repository that contains the commit you want to amend. Use the git rebase -i HEAD~n command to display a list of the last n commits in your default text editor. Replace pick with reword before each commit message you want to change.
The highlighting in an editor is not controlled by git's configuration. Highlighting works by default in git bash because it comes with a vim pre-configured with git syntax files.
Assuming you are using vim for the git editor on mac, first try enabling vim syntax highlighting by adding syntax on
to ~/.vimrc
.
Failing that, you may need to download and install git syntax files.
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