Created
July 15, 2021 13:56
-
-
Save goforbroke1006/d1deba8dcc7af8ae77cdb5e6939279ed to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
git reset --hard HEAD~10 # move to old commit (HEAD minus 10) | |
git merge --squash HEAD@{1} # merge all new commits posted after old commit | |
git commit -m "Initial commit" # set commit message | |
git push --force # force push to ignore origin commits' history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment