我使用composer启动了一个新项目。使用git跟踪版本的项目。
问题是,我已经安装了组件"zendframework/zend-session": "^2.7",现在当我尝试执行git add vendor/zendframework/zend-session,然后运行git status时,会得到以下结果:
On branch feature/install-session-manager
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: vendor/zendframework/zend-session (modified content)
no changes added to commit (use "git add" and/or "git commit -a")注意:当然,我没有修改文件夹vendor/zendframework/zend-session中文件的代码
有谁知道我怎样才能在我的git存储库上完成这些修改呢?
发布于 2016-09-12 08:01:28
您需要将vendor文件夹添加到.gitignore中,这是一个非常好的实践
这样,每个开发人员都可以拥有不同的本地版本的供应商,并且您不需要将它们存储/检索到git回购中。
要将其添加到.gitignore,只需将字符串vendor放在文件中即可。
要取消当前在.gitignore下的先前文件,只需运行
git rm -r --cached .https://stackoverflow.com/questions/39445749
复制相似问题