Rollback to last git commit

后端 未结 6 2106
时光取名叫无心
时光取名叫无心 2020-12-22 16:05

I just did a

git commit -m \"blah\"

then I added some files, how do I rollback and remove what is in my current files that have not yet be

6条回答
  •  北海茫月
    2020-12-22 16:13

    You can revert a commit using git revert HEAD^ for reverting to the next-to-last commit. You can also specify the commit to revert using the id instead of HEAD^

提交回复
热议问题