I cloned a copy of the project code locally
Modified a.php
I made too many changes and wanted to give up. I deleted a.php
I wanted to pull a new copy of a.php
, which was bloated. Yeah.
It would be nice if svn didn’t just update it once! !
PHP中文网2017-05-02 09:28:59
git checkout -- a.php
or, don't care what file specifically
git checkout HEAD
or, you messed all things up
git reset --hard HEAD
伊谢尔伦2017-05-02 09:28:59
Single filegit checkout a.php
git checkout a.php
当前目录git checkout .
Current directory
git checkout .
🎜ringa_lee2017-05-02 09:28:59
1. Enter the project folder through the terminal
2. Enter the command and execute: git checkout file path (including file name)
At this time, the file has been restored to its unmodified state
曾经蜡笔没有小新2017-05-02 09:28:59
git checkout branch name -- the complete relative path of a.php, you can download the online branch code