Answers for "git set head to commit"

0

git set head to commit

# Set a new HEAD to a branch
# Note that commit can be a commit hash or tag or another branch
git reset --hard $COMMIT
Posted by: Guest on November-22-2020
1

get back some commits git

git revert {commit_id}'
Posted by: Guest on September-09-2020
0

reset to commit

# rollback to commit state
git revert --no-commit 0766c053..HEAD
git commit
Posted by: Guest on April-10-2020
0

reset to commit

# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
Posted by: Guest on April-10-2020
-1

reset to commit

# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
# to go back to original branch, git checkout master
Posted by: Guest on April-10-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language