Sunday 15 July 2012

Git - different submodules in two different branches -


My super-project has two branches - master and dev I initially got a sub-leaf in these two branches, but now I have to keep it in the dev branch to do this, I switched to the Master branch and it Removed from there (following instructions). Now every time I switch from dev branch to master branch, I get a message which warns: unable to rmdir path / to / submodule: directory Is not empty . Also, every time I do master in the branch git status , git lists submissions under untracked files.

Is there any way that I should tell the guit not to complain about it? I tried to add the submission path to the master branch in the .gitignore , but it does not seem that besides this, I am curious that GIT does not complain that when a folder is present in a branch and Does not happen in the other, but this happens when a branch is present in one branch and not in another?

Edit: I did not remove the section related to the .git / config file while removing the submitter because I still want it in Dev branch Was there.

There are more complete instructions about how to remove one of your submissions:

The issue which most users attempts to delete a subdue is:

  git rm - cached path_to_submodule (no trailing slash)   

The reason for this is that they are usually removed (ordinary OS rm command, not a git rm command) path of the footer, which means that it is no longer visible Is giving up.
Still, it is still registered in the index.


If you only need to remove the subdomain in one branch (and keep it in another), then you need it:

  • No Modify .git / config : This is a local configuration used by all repos (and all its branches): Therefore, any git submodule deinit Not here (clears about the submodule in .git .)
  • Remove the submodule entry:
    • .gitmodules < / Code> file (you can
    • Index: git rm - cached path_to_submodule (no trailing slash): again an amendment that you do in only one branch.
    • Li >

No comments:

Post a Comment