Git SourceTree - Uncommitted Submodules

I cloned a repository on my local computer (Xcode iOS project) that contains 3 submodules.

One of the submodules is private and inaccessible to me, so I commented it out from a .git/config file so that I could do some work.

Now I came to commit my changes and the following dialogue was presented -

Uncommitted submodules dialog

My question is: what happens if I click skip and move my changes to the remote repository. Will this affect other developers (who have access to the private submodule) who pull my commit. I do not want to insist that it removes the submodule from the remote repo.

Hope this makes sense and thanks in advance for any comments or answers.

Cheers, Adam

[UPDATE] This article seems to suggest that skipping a pass does not leave any changes and will not be pushed to the console. http://blog.sourcetreeapp.com/2012/02/01/using-submodules-and-subrepositories/

+9
git bitbucket
source share
1 answer

Submodules are similar to code links in repositories. Think of them as a pointer to another repo.

It is important to understand that when you take out the submodule, there is a local copy of the submodule repo on your disk, and if there are any intentional / unintentional changes in the submodules, you are asked about the above invitation.

To answer your question: If you click the skip button, only the changes in your repo will be skip and the submodule will be deleted. This can make your code unstable if you rely on these changes in the submodules.

If you click commit your changes to the submodule will also be committed.

As a rule, it is recommended that you make any changes to the submodules individually and extract these changes from your repo. If submodules are heavily used, I would recommend using the git dependency manager or subtree to reference it.

enter image description here

+1
source share

All Articles