Answers for "git move commit to latest"

5

move to last commit

git reset --hard HEAD
Posted by: Guest on May-12-2020
-1

git move latest commit to new branch

git checkout existingbranch
git branch newBranch
git reset --hard HEAD~2 # go back 2 commits on existingBranch
Posted by: Guest on January-26-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language