How to pull git from the server after modifying and deleting a file locally?
某草草
某草草 2017-05-02 09:26:59
0
4
619

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! !

某草草
某草草

reply all(4)
洪涛

git checkout -- a.php

or, don't care what file specifically

git checkout HEAD

or, you messed all things up

git reset --hard HEAD

伊谢尔伦

Single file
git checkout a.phpgit checkout a.php
当前目录
git checkout .Current directory

git checkout .🎜
左手右手慢动作

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

曾经蜡笔没有小新

git checkout branch name -- the complete relative path of a.php, you can download the online branch code

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template