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

前端 未结 30 2015
不思量自难忘°
不思量自难忘° 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:55

    if you commit a wrong file in your last commits follow the instruction :

    1. open source tree, change to this commit

    1. change the lines and find your commit that the wrong file sent as commit

    1. you can see the list of your changes in that commit
    2. select it and then click on ... buttons right-hand side ... click reverse file
    3. then you can see it on file status tab at the bottom left-hand side then click unstage:

    1. open your visual studio code and revert back by committing your removed files
    2. after them all, you can see results in your last commit in the source tree

提交回复
热议问题