How can I reset or revert a file to a specific revision?

前端 未结 30 1971
不思量自难忘°
不思量自难忘° 2020-11-21 11:23

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous versio

30条回答
  •  长发绾君心
    2020-11-21 11:56

    Obviously someone either needs to write an intelligible book on git, or git needs to be better explained in the documentation. Faced with this same problem I guessed that

    cd 
    git revert master
    

    would undo the last commit which is seemed to do.

    Ian

提交回复
热议问题