Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #git #commit
ADD COMMENT
Topic
Name
9+7 =