Last active
August 20, 2018 20:04
-
-
Save shunfan/8d1b9ba1dc8409ba809072de952cd130 to your computer and use it in GitHub Desktop.
Git Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Squash commits on branch into one commit: | |
git log --oneline | |
git rebase -i HEAD~<number of commits back to include + 1> | |
# leave extra commit as "pick" | |
# leave oldest commit for this branch as "pick" | |
# change all others to s | |
# save and exit | |
# edit commit message | |
git push —force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment