Checking out an old commit and maintaining the head on the master branch?

后端 未结 6 1729
名媛妹妹
名媛妹妹 2020-12-22 16:29

Currently for switching to another git commit (on the same branch...actually, on the master branch!), I\'m executing the command

git checkout ea3d5ed039edd6d         


        
6条回答
  •  清酒与你
    2020-12-22 17:24

    Most of the time when I do this I checkout to a temp branch:

    git checkout -b temp-branch-name ea3d5ed039edd6d4a07cc41bd09eb58edd1f2b3a
    

    Then after I'm done i just delete the branch

提交回复
热议问题