Last active
January 30, 2019 00:21
-
-
Save kunwardeep/7d8337fc6d976afb60bbc9c97fa95abd to your computer and use it in GitHub Desktop.
Merge all commits from a branch into a single commit
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
git checkout yourBranch | |
git reset $(git merge-base master $(git rev-parse --abbrev-ref HEAD)) | |
git add -A | |
git commit -m "one commit on yourBranch" | |
git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment