1

OSXのgitは変更されたサブディレクトリを認識しますが、それを「追加」しません。どうすればこれを修正できますか?ありがとう!(そのサブディレクトリに開いているファイルはないと思います)

~/gitrepo/python: git status
# On branch br1
# 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:   v0/mage-Upload (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
~/gitrepo/python: git add v0
~/gitrepo/python: git add v0/mage-Upload    <-- I guess that was unnecessary
~/gitrepo/python: git diff
diff --git a/v0/mage-Upload b/v0/mage-Upload
--- a/v0/mage-Upload
+++ b/v0/mage-Upload
@@ -1 +1 @@
-Subproject commit 7c377092f1f5cbbeecc03ebb533259c23606506e
+Subproject commit 7c377092f1f5cbbeecc03ebb533259c23606506e-dirty
~/gitrepo/python: git commit -a
# On branch br1
# 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:   v0/mage-Upload (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
4

3 に答える 3

4

キャッシュから削除してから、再度追加してみてください

git rm --cached v0
git add v0
于 2012-06-20T14:18:40.077 に答える
2

'v0 / mage-Upload'にサブモジュールがあるようです。'スーパーモジュール'で変更する前に、サブモジュールで変更を処理する必要があります。次のようなことをします:

cd vo/mage-Upload
git status
git commit    # Careful if the submodule is not on a branch
              #   see 'git submodule' documentation
git push ...  # Specific to your submodule

この時点で、「スーパーモジュール」を返し、サブモジュール参照に変更をコミットできます。

于 2012-06-20T23:33:29.050 に答える
0

mage-UploadはGitサブモジュールです。次のことを行う必要があります。

cd vo/mage-Upload
git commit -a (or whatever you want to commit)
cd ../..
git commit -a

これにより、サブモジュールの変更がコミットされ、新しいサブモジュールバージョンがメインリポジトリにコミットされます。

于 2012-06-21T00:12:56.437 に答える