Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

revert a specific old commit

git revert 797832c
Comment

git revert back to specific commit

# 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
Comment

git revert to old commit

git reset --hard c14809fa
Comment

PREVIOUS NEXT
Code Example
Shell :: git commit message 
Shell :: how to open sublime in linux 
Shell :: change flutter package name 
Shell :: kernel headers were not found vmware kali linux 
Shell :: ubuntu wsl go to desktop 
Shell :: mongodb recherche like 
Shell :: git add gitignore 
Shell :: install docker-compose in centos 8 
Shell :: see network trafic linux 
Shell :: docker build 
Shell :: how to install choclatey using command prompt 
Shell :: how to set to default terminal in ubunty 
Shell :: batch multiline command 
Shell :: meteor uninstall 
Shell :: Reading state information... Done E: Unable to locate package docker-ce 
Shell :: how to install docker in ubuntu 
Shell :: class sorting in tailwindcss 
Shell :: which equivalent powershell 
Shell :: Re-run cmake with a different source directory. 
Shell :: android studio kvm is required to run this avd 
Shell :: how to revert a git stash 
Shell :: wsl settings 
Shell :: check litespeed version command 
Shell :: linux bash clean up log files 
Shell :: delete a github repository using curl 
Shell :: github ssh key 
Shell :: enable remote desktop powershell server 2019 
Shell :: matplotlib log colorbar 
Shell :: how to learn cuda version 
Shell :: switch user in windows 10 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =