How can I rollback a github repository to a specific commit?

后端 未结 6 1965
孤街浪徒
孤街浪徒 2020-11-28 16:44

My github has 100 commits in it right now. I need to rollback the repository to commit 80, and remove all the subsequent ones.

Why? This repo is supposed to be fo

6条回答
  •  清歌不尽
    2020-11-28 17:28

    git reset --hard 
    git push -f  
    

    Note: As written in comments below, Using this is dangerous in a collaborative environment: you're rewriting history

提交回复
热议问题