Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git command change to previous comit

# Checkout a given commit.
# Doing so will result in a `detached HEAD` which mean that the `HEAD`
# is not pointing to the latest so you will need to checkout branch
# in order to be able to update the code.
git checkout <commit-id>

# Create a new branch forked to the given commit
git checkout -b <branch name>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #command #change #previous #comit
ADD COMMENT
Topic
Name
7+1 =