我们有一个私人服务器来处理项目的回购。现在,按照我已经做了几次的程序,突然间,我偶然发现其中一个模块上的“composer require”不包含应该在那里的.git/
文件夹。git /文件夹没有拉到作曲家需要
“可能发生”我想,有人可能忘记在创建回购时将其包含在内。然而,要vendor/company/module
时,删除文件,做git init
+ git remote add origin ssh:repo.git
+ git pull
,我会遇到git add .git/
什么也不做,但给我下面的警告:
$ git add .git/
warning: LF will be replaced by CRLF in .git/FETCH_HEAD.
The file will have its original line endings in your working directory.
error: Invalid path '.git/FETCH_HEAD'
error: unable to add .git/FETCH_HEAD to index
fatal: adding files failed
认为我会问,如果有人有一个想法如何确保.git/
在从Satis服务器上拉(通过composer install/update/require
)时包含在内。
尚未找到针对[git] folder
,[git] .git/ folder
或多个结果页面的更多变体搜索SO的解决方案。
Git仓库的'.git /'目录从不被跟踪。它在你运行'git clone'或'git init'时被创建。事实上,它不能被追踪。这个特定的依赖来自Git回购或其他地方吗? – Chris
我们自己的git回购之一。只是从来没有查过为什么我们总是使用'--prefer-source'标志。尽管如此,请看下面的答案。但是无法找到如何在composer配置中包含一个自动的'--prefer-source',这样在终端中这个标志就没有必要了。你有什么想法吗? – Nukeface