请看下面的实线为我原来的问题。
我的本地目录中有一个文件夹没有被跟踪。当我运行 git status
时,我得到:
Changed but not updated:
modified: vendor/plugins/open_flash_chart_2 (modified content, untracked content)
当我输入 git add vendor/plugins/open_flash_chart_2
然后再次尝试 git status
,它仍然显示未跟踪。这是怎么回事?
以下是我最近半个小时的简单总结:
发现我的 Github 回购没有跟踪我的 vendor/plugins/open_flash_chart_2
插件。具体来说,没有内容,并且在文件夹图标上显示了 绿箭。
试了 git submodule init
No submodule mapping found in .gitmodules for path 'vendor/plugins/open_flash_chart_2'
Tried git submodule add git://github.com/korin/open_flash_chart_2_plugin.git vendor/plugins/open_flash_chart_2
vendor/plugins/open_flash_chart_2 already exists in the index
git status
modified: vendor/plugins/open_flash_chart_2 (untracked content)
Hunted for any file named .gitmodules
in my repository/local directory but couldn't find one.
What do I have to do to get my submodules working so git can start tracking properly?
This may be unrelated (I include it in case it helps), but every time I type git commit -a
rather than my usual git commit -m "my comments"
, it throws up an error:
E325: ATTENTION
Found a swap file by the name ".git\.COMMIT-EDITMSG.swp"
dated: Thu Nov 11 19:45:05 2010
file name: c:/san/project/.git/COMMIT_EDITMSG
modified: YES
user name: San host name: San-PC
process ID: 4268
While opening file ".git\COMMIT_EDITMSG"
dated: Thu Nov 11 20:56:09 2010
NEWER than swap file!
Swap file ".git\.COMMIT_EDITMSG.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
Swap file ".git\.COMMIT_EDITMSG.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
我在 Github 是一个完全的新手,尽管尝试通过文档,我有点被这些特殊的问题难住了。谢谢你。