Answers for "git reset initial commit"

3

git reset to commit

# reset to specefic commit
git reset --hard <commit id>

# to go back one step 
git reset --hard HEAD~1

# note: use --soft to keep file changes
Posted by: Guest on March-05-2021
0

git reset initial commit

git update-ref -d HEAD
Posted by: Guest on December-07-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