我已将git
设置为我的项目,以将修改推送到gitlab repository
。git commit修改和未跟踪的内容
我从github
其位于/vendor/dereuromar/cakephp-queue
还有一个.git
目录,当我把我的项目gitlab
在插件目录
与git
相关的其他文件安装插件,一切都推除本目录。
当试图git status
它给误差
On branch master
Your branch is up-to-date with 'origin/master'.
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/dereuromark/cakephp-queue (modified content, untracked content)
no changes added to commit (use "git add" and/or "git commit -a")
我试着删除.git
目录,.gitignore
和vendor/dereuromark/cakephp-queue
.gitattributes
目录。
的git status
输出是
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
但是,目录中的内容不上传到gitlab
。
如何推送此目录的内容?我还没有创建任何submodule
。
您对子模块的工作原理有一个根本性的误解。我建议阅读[Pro Git](https://git-scm.com/book/en/v2/Git-Tools-Submodules)中解释子模块的部分以及文档:使用子模块管理工作树更改为一项复杂的任务。 – Pockets
我说过,我还没有创建任何子模块。插件目录由于包含'.git'目录,因此被视为子模块。 –
似乎你已经错过了GIT的概念。您不能提交.git文件夹,因为它是存储库的管理文件夹,并且它是每个克隆的文件夹,它不是由GIT管理和分发的存储库的一部分。 – yorammi