git checkout previous commit
git revert <commit hash># This will destroy any local modifications.
# Don't do it if you have uncommitted work you want to keep.
git reset --hard 0d1d7fc32
# Alternatively, if there's work to keep:
git stash
git reset --hard 0d1d7fc32
git stash pop
# This saves the modifications, then reapplies that patch after resetting.
# You could get merge conflicts, if you've modified things which were
# changed since the commit you reset to.git checkout <commit hash> # go to previous commit
git revert <commit hash> # revert action of going to previous commitgit checkout <commit>git reset --hard HEAD~10
To rollback 10 commits back:# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
Also in C++:
- set java_home permanently ubuntu
- bash change to script directory
- install babel core
- delete a folder then git push
- More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands.
- install eclipse in fedora
- how to check if you have nodejs installed
- cat command in linux
- how to perform hdfs string search recursively in hdfs
- install spring boot on ubuntu
- merge github accounts
- serve build node npm
- linux run task in background
- install npm mac
- remove last field using awk
- mkdir command
- git overwrite local changes
- bash list the top ten largest values in a column
- pip install apache beam
- password encryptin powershell
- brew install pgdump
- uninitialize git
- ubuntu export path
- nginx increase upstream size in conf