Last active
August 26, 2021 12:27
-
-
Save brianpursley/fbf59cd1e30c3cef3c11cce0c5379f70 to your computer and use it in GitHub Desktop.
Git commands
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
# Function to squash last N commits | |
squash() { git reset --soft HEAD~$1; git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"; } | |
# Merge changes from upstream into current branch | |
git fetch upstream && git merge upstream/master | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment