git reset --hard <SHAsum of your commit>
git push -f
git revert <commit-hash>
# This will create three separate revert commits:
git revert a867b4af 25eee4ca 0766c053
# It also takes ranges. This will revert the last two commits:
git revert HEAD~2..HEAD
#Similarly, you can revert a range of commits using commit hashes (non inclusive of first hash):
git revert 0d1d7fc..a867b4a
# Reverting a merge commit
git revert -m 1 <merge_commit_sha>
# To get just one, you could use `rebase -i` to squash them afterwards
# Or, you could do it manually (be sure to do this at top level of the repo)
# get your index and work tree into the desired state, without changing HEAD:
git checkout 0d1d7fc32 .
# Then commit. Be sure and write a good message describing what you just did
git commit
git reset --hard 61234
git push -f
Code Example |
---|
Shell :: install r packages in anaconda |
Shell :: gitlab remove branch |
Shell :: run bat file with arguments |
Shell :: blackeye linux |
Shell :: npm install mongoose specific version |
Shell :: dollar to pkr |
Shell :: ifconfig not found |
Shell :: zsh: command not found: aws |
Shell :: how to remove filmora watermark |
Shell :: linux unzip command |
Shell :: restart mosquitto |
Shell :: how to install snap store on kali linux |
Shell :: git tag checkout |
Shell :: zip folder linux |
Shell :: start fast api server |
Shell :: composer install linux |
Shell :: bash delete env variable |
Shell :: git list stashes |
Shell :: github visualise branches |
Shell :: run zipkin-server on docker |
Shell :: navigate to folder mac1 |
Shell :: body-parser use |
Shell :: htaccess deny all but |
Shell :: remove cuda windows cmd |
Shell :: apt list only security updates |
Shell :: cascadia code vscode ubuntu |
Shell :: remove all folder except one linux |
Shell :: solana install |
Shell :: bash make script |
Shell :: linux mail delete all |