Git rebase reset HEAD

One command that I find important when doing a Git rebase is.

git reset HEAD\^

This will reset your commit back during an interactive rebase and then you can do an add -p or whatever you want with the files. It really allows you to start with a fresh change set on that given commit. If you are not using ZSH you should but you don’t need to escape the carrot so it would look like this.

git reset HEAD^

Leave a Reply

Your email address will not be published. Required fields are marked *