'Make git interactive rebase say "p" instead of "pick"?

This is a minor annoyance. When I do git rebase -i origin/master, it says "pick" and I have to press backspace 4 times to delete it and change it to something else (or learn a keyboard shortcut). Is there a way to make it just say "p"? I'm using a git alias for rebasing, so I can just add it there.

git


Solution 1:[1]

Since git 2.16 a few months after this question was asked, there's config option rebase.abbreviateCommands for this.

$ git config --global rebase.abbreviateCommands true

Solution 2:[2]

If you are already using an alias for the rebase, you could include this line:

sed -i -e '2,$ s/^pick/p/' .git/rebase-merge/git-rebase-todo

This command will change all lines that start with "pick" to "p" in the file that you modify during the interactive rebase.

This may require some playing around with/timing but could be a starting point for your desired functionality.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ak2
Solution 2 Jonathan.Brink