Answers for "set local repo to previous commit"

0

Update previous git commit

$ (some_branch) git commit --amend --no-edit
Posted by: Guest on September-17-2021
0

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>
Posted by: Guest on December-08-2020

Code answers related to "set local repo to previous commit"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language