[英]Can Apache Configuration File (httpd.conf) Be Located Elsewhere?
[英]Running “git status” against a repository located elsewhere in the system
我知道我可以这样做:
git --git-dir="Z:/www/proj/web/test/sample-repo-cloned/.git" status
但是,问题在于该命令是从proj
文件夹运行的,这意味着还将考虑sample-repo-cloned
前的所有文件。
有没有办法在sample-repo-cloned
文件夹的范围内运行此命令?
您应该能够指定工作树以及git目录:
--work-tree
即:
git --work-tree="Z:/www/proj/web/test/sample-repo-cloned/" --git-dir="Z:/www/proj/web/test/sample-repo-cloned/.git" status
结果应该在工作树根目录的本地。
(cd Z:/www/proj/web/test/sample-repo-cloned ; git status)
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.