I'm trying to set up a script to automatically rebase changes from the development branch to branches containing Maven child modules.
The way this project is setup is that the development branch contains the parent module. All changes go to that module and so are merged to the development branch. In order for the child modules to get these chagnes, the must be rebased onto development. The child modules themselves should never be modified in a rebase.
When I try to use my script to rebase the child branch onto development, I get a conflict stating that the child module has been deleted on the development branch. This makes sense, as that module does not exist in development. I need the rebase to ignore anything to do with the child module, so I added this line to .gitignore in the project:
*_module/
The naming convention of each child module has '_module' at the end, so with *, then each branch should be able to ignore the child module in question, regardless of name. However, this has not worked. I've yet to find anything regarding this use case, and am wondering if anyone else has any advise on how to proceed.
Here is the general file structure of the development branch:
project+
|
+-src+ #parent module
| |
| +-main #where changes to the code occure
|
+.gitattributes
|
+.gitignore
|
+pom.xml
And here is the structure of a branch with a child module:
project+
|
+-test1_module+ #child module in maven. Need to ignore this in .gitignore, or some equivalent
| |
| +-src+
| |
| +-assembly
| |
| +-main
|
+-src+ #parent module
| |
| +-assembly
| |
| +-main
|
+.gitattributes
|
+.gitignore
|
+pom.xml
EDIT: To be clear, I do not want to delete this child module from the git repository; I simply want to ignore or skip over any changes to it during a rebase.