How to discard local commits in Git?

后端 未结 6 1118
忘掉有多难
忘掉有多难 2020-12-04 04:44

I\'d been working on something, and decided it was completely screwed...after having committed some of it. So I tried the following sequence:

git reset --har         


        
6条回答
  •  半阙折子戏
    2020-12-04 05:23

    I had to do a :

    git checkout -b master
    

    as git said that it doesn't exists, because it's been wipe with the

    git -D master
    

提交回复
热议问题