Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git go back a commit

# as the best wat to revert back 3 commits
git revert HEAD~3
git restore #to restore files from commit
Comment

git go back to previous commit

git checkout 12feg3435 #commit ID
Comment

git go back one commit

#You need to be careful with going back a commit, you could reset your 
#branch and loose all of your work. 

#safe option:
git checkout <commit-id>




Comment

git go back to commit

# Go back to the selected commit on your local environment
# Don't forget the . in the end
git checkout <commit-id> .

# Add this version to the staging area and push to remote
git add .
git commit -m "Reverting to <commit-id>"
git push
Comment

PREVIOUS NEXT
Code Example
Shell :: github page 404 
Shell :: windows edit file cmdp 
Shell :: grant all the permission to the user ubuntu 
Shell :: firebase deploy with token 
Shell :: tar extract powershell 
Shell :: windows untar powershell 
Shell :: install forge server command line 
Shell :: nvm command node not found 
Shell :: install rasa 
Shell :: linux show alias function 
Shell :: ffprobe get duration 
Shell :: amend commit 
Shell :: styled typescript 
Shell :: git lfs install 
Shell :: apache enable module 
Shell :: square root in bash script 
Shell :: solana install 
Shell :: move all files in a directory linux 
Shell :: rails aborted! TypeError: superclass mismatch for class Command 
Shell :: bash variable name to function 
Shell :: how to install edge throught terminal ubuntu 
Shell :: access wsl filesystem from windows 
Shell :: install express.js 
Shell :: Cannot install in Homebrew on ARM processor in Intel default prefix 
Shell :: install dlib gpu check 
Shell :: how to push force git 
Shell :: bash division integer 
Shell :: ubuntu version command line 
Shell :: install specific version of node 
Shell :: wine telecharger linux 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =