Created
October 17, 2022 07:41
-
-
Save Tridy/b7721cc078bbc021195f7e216c018c94 to your computer and use it in GitHub Desktop.
Amend multiple Git commits with one line
This file contains hidden or 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 main $(git branch --show-current)) | |
git add -A | |
git commit -m "one commit on yourBranch" | |
git push -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment