Rolling back a remote Git repository

前端 未结 4 1461
谎友^
谎友^ 2020-11-29 15:58

I have a remote Git repository, and I need to roll back the last n commits into cold oblivion.

4条回答
  •  北海茫月
    2020-11-29 16:32

    If you have direct access to the remote repo, you could always use:

    git reset --soft 
    

    This works since there is no attempt to modify the non-existent working directory. For more details please see the original answer:

    How can I uncommit the last commit in a git bare repository?

提交回复
热议问题