scripts icon indicating copy to clipboard operation
scripts copied to clipboard

.gitignore files don't combine, files in submodule get ignored if they match a rule in parent's .gitignore

Open millibeckers opened this issue 6 years ago • 0 comments

After integrating a submodule into the main repo, we noticed that there were some key pieces of our submodule that were missing and eventually determined that it was because they were now subject to the top level .gitignore rules instead of their own.

This should be fairly simple to reproduce, have a parent repository that has build/ in its .gitignore and then have the submodule have a wanted directory with build/ in the filepath and then run the script. All the files in the submodule will be on your local, but anything under the build/ directory won't be pushed.

The script should have a section that combines the .gitignore files so that the former submodule won't now be subject to the old parent's rules.

millibeckers avatar Dec 20 '19 22:12 millibeckers