Answers for "git previous commit to new head"

CSS
0

make previous commit master

git checkout master
git reset --hard <old_commit_id>
Posted by: Guest on August-13-2020
0

git checkout previous commit HEAD

# 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 "git previous commit to new head"

Browse Popular Code Answers by Language