git reset --hard与git-dir选项一起使用时检出当前目录中的文件

时间:2014-10-31 13:12:36

标签: git git-reset

[root@localhost ~]# pwd
/root
[root@localhost ~]# ls
labs  logs  ovpl
[root@localhost ~]# git --git-dir=/root/labs/cse02-programming/.git reset --hard
HEAD is now at 935ca9d apt-get update added to labspec
[root@localhost ~]# ls -l
total 28
drwxr-xr-x 4 root    root    4096 Oct 30 12:54 labs
drwxr-xr-x 2 root    root    4096 Oct 31 17:37 logs
drwxrwxr-x 3 travula travula 4096 Oct 30 12:53 ovpl
drwxr-xr-x 2 root    root    4096 Oct 31 18:37 python-scripts
-rw-r--r-- 1 root    root    2143 Oct 31 18:37 README.txt
drwxr-xr-x 2 root    root    4096 Oct 31 18:37 scripts
drwxr-xr-x 6 root    root    4096 Oct 31 18:37 src
[root@localhost ~]# 

问题是:在当前工作目录中检出存储库,正如您可以看到python-scripts,scripts,src和README.txt已添加到此处。

如何在/ root / labs / cse02编程itselff中强制执行此结帐?

0 个答案:

没有答案