VCS (Git) within Sub Folder updating Main Project

I have a project under VCS (Git) with (at the moment) one sub folder which is also set up under Git, I followed some advice on here and that all works as expected - I am able to make changes and pulls from the 2 remotes quite separately.

However, as part of the project I'd like to be able to commit and push the changes inbound from the subfolder onto the projects repo. At the moment it appears to be that the sub folder with the seperate git repo in is excluded from the main project commit.

Is there a way around this - in order to get the whole project, including all internal vcs repo's pushed to my main repo?

To clarify:

Main Project
Folder
Folder
Folder - with git Folder

I want to have all folders including "with git" to commit.

 

Thanks if I have this confused!

0
4 comments

Not sure if we understand you completely. Folder with git shouldn't be excluded unless you've excluded it manually. Only a .git folder might be excluded by default.

Do you want just to have "folder with git" to be added to VCS tracking (git add) or you want to manage commit history of a subfolder (with git folder) with a top level project?

0

My apologies if this was vague and insubstantial.

My project is comprised of a root level git repository which contains another (folder level) git repo.

When I make changes to the folder level git - these changes do not appear in the root level commit. Its like the root level commit is ignoring any code updates within the folder, however - the folder level git works perfectly (its almost as if they are 2 separate items).

To explain further:

I can make an alteration within the folder based repo, have that reflected within the files but when I go to commit the whole project the changes are not there.

 

 

0

I have just discovered that if I do a "Update file status" on the project it pulls in the updated files, this is what I wanted to achieve.

I expected this to be done automatically when I made changes in the sub folder.

0

 Well that didnt work.

The files show as being ok to commit and then when I click committ is says this:

Commit failed with error
            0 files committed, 1086 files failed to commit: Final test for dual commit
            On branch master
            nothing to commit, working directory clean

so weird.

0

Please sign in to leave a comment.