1

I am trying the following commit (in Posh-Git on PowerShell):

C:\Dev\Android\Projects\HeavyWeights [master ≡ +0 ~1 -0 !]> git commit -a
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
        modified:   DotNetHeavyWeights (modified content)

The file isn't untracked, but I did try this anyway, with the exact same results for the commit attempt:

C:\Dev\Android\Projects\HeavyWeights [master ≡ +0 ~1 -0 !]> git add DotNetHeavyWeights

I added the DotNetHeavyWeights folder to the root HeavyWeights root folder last night, and the commit went fine.
Why won't Git include this folder in the commit?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
ProfK
  • 49,207
  • 121
  • 399
  • 775

1 Answers1

0
DotNetHeavyWeights (modified content)

That means it is a nested Git repo (the is a .git folder in it) or a submodule (look for a .gitmodules file in your main repo).

You need to add, commit and push within that DotNetHeavyWeights folder, before going back to the parent repo, add, commit and push the new SHA1 represented by that submodule (ie the gilink, a special entry in the index)

git add DotNetHeavyWeights 
# no trailing slash
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you, most correct. It was a separate solution before I, very late at night, placed it in the new folder. – ProfK Sep 03 '16 at 11:37