Git squash

P -> Q -> R
           \
            .--> X -> Y
P -> Q -> R
           \
            .--> Z
  1. git rebase -i
  2. Change pick to squash for some commits which want to squash. Save and quit.
  3. Change a new message commit for squashing. Save and quit.
  4. git push --force
https://github.com/servo/servo/wiki/Beginner's-guide-to-rebasing-and-squashing

Comments

Popular posts from this blog

Login/Logout account Git in Terminal/cmd

Logout Git on MacOS

React Tutorial for Beginners