Pergunta

In Tortoisegit you can select multiple commits at the head of a branch and replace them with a single commit. (Show the log, select the commits, and right click). When this happens, you are given the opportunity to write a new commit message.

What is the command line equivalent to do this?

Foi útil?

Solução

Do an interactive rebase.

git rebase -i master

will rebase your current branch on master and let you edit/remove/rearrange commits and edit commit messages. You can also arbitrarily select which branch or range of commits to rebase and onto which branch.

Interactive rebase help on GitHub

Git rebase docs

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top