I've got a code base in which I want to add another repo as a submodule to do some integration testing.
(我有一个代码库,我想在其中添加另一个回购作为子模块来进行一些集成测试。)
So following a tutorial I ran (所以按照教程我跑了)
git submodule add -b master git@gitlab.com:kramer65/whisky.git
After that, a git status
gives me this:
(之后, git status
为我提供了这一点:)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitmodules
whisky/
nothing added to commit but untracked files present (use "git add" to track)
As you can see the .gitmodules
file is new, but the whisky/
folder also appears as untracked.
(如您所见, .gitmodules
文件是新文件,但是.gitmodules
whisky/
文件夹也显示为未跟踪。)
After this I committed the .gitmodules
file, but the whisky/
folder still appears as untracked. (之后,我提交了.gitmodules
文件,但是.gitmodules
whisky/
文件夹仍然显示为未跟踪。)
How should I handle this?
(我该如何处理?)
Do I need to add the whisky/
folder also to the "host repo"? (我是否还需要将whisky/
文件夹添加到“主机存储库”中?)
Or do I need to add it to .gitignore
? (还是我需要将其添加到.gitignore
?)
Or is there another way to handle this? (还是有另一种方法来解决这个问题?)
All tips are welcome!
(欢迎所有提示!)
ask by kramer65 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…