How to use Git Revert

后端 未结 5 1067
一生所求
一生所求 2020-12-04 07:51

How is git revert used?

This might sound like a duplicate question but when people ask it, the response is often, use git reset as per Reve

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 08:11

    I reverted back a few commits by running 'git revert commit id' such as:

    git revert b2cb7c248d416409f8eb42b561cbff91b0601712
    

    Then i was prompted to commit the revert (just as you would when running 'git commit'). My default terminal program is Vim so i ran:

    :wq 
    

    Finally i pushed the change to the repository with:

    git push
    

提交回复
热议问题