-
-
Save im-coder-lg/8b3e7994cf874e34179f76563f9046cc to your computer and use it in GitHub Desktop.
Delete commits from repository. Upgraded version
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
#!/bin/bash | |
read -p "Git Commit SHA hashcode:" $commit | |
# First, check out the commit you wish to go back to (get sha-1 from git log) | |
git reset --hard $commit | |
# Then do a forced update. | |
git push origin +$commit^:develop | |
# Push specific commit | |
git push origin $commit:develop -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
upgraded version