基本操作如下
root@yzy-All-Series:~/soft/git# git clone
https://github.com/simpl/ngx_devel_kit/Cloning into 'ngx_devel_kit'...
remote: Reusing existing pack: 494, done.
remote: Total 494 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (494/494), 147.23 KiB | 77 KiB/s, done.
Resolving deltas: 100% (222/222), done.
root@yzy-All-Series:~/soft/git#
root@yzy-All-Series:~/soft/git# ls
ngx_devel_kit
root@yzy-All-Series:~/soft/git# cd ngx_devel_kit/
root@yzy-All-Series:~/soft/git/ngx_devel_kit# ls
auto docs ngx_auto_lib_core objs README src
config examples notes patches README_AUTO_LIB TODO
root@yzy-All-Series:~/soft/git/ngx_devel_kit# touch a.txt
root@yzy-All-Series:~/soft/git/ngx_devel_kit# git add .
root@yzy-All-Series:~/soft/git/ngx_devel_kit# git commit -a -m " "
Aborting commit due to empty commit message.
root@yzy-All-Series:~/soft/git/ngx_devel_kit# git commit -a -m "a"
[master b948782] a
0 files changed
create mode 100644 a.txt
root@yzy-All-Series:~/soft/git/ngx_devel_kit#
root@yzy-All-Series:~/soft/git/ngx_devel_kit# rm -rf a.txt
root@yzy-All-Series:~/soft/git/ngx_devel_kit# rm -rf config
root@yzy-All-Series:~/soft/git/ngx_devel_kit# git commit -a -m "aaa"
[master 9b7cc51] aaa
1 file changed, 49 deletions(-)
delete mode 100644 a.txt
delete mode 100644 config
现在怎么样可以把我删除或者修改的文件给找回来。 对GIT不熟悉 网上搜索了下好像可以用git checkout来找回,不过好你有点麻烦。 有没有像SVN中的 svn update 一下就把本地的文件同仓库的同步了。求解答。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/96303
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.