2

Everytime I make changes in the submodule, git registers the new commit in my original project

enter image description here

This causes loads of conflicts between different team members. How can this be prevented?

Skarlinski
  • 2,419
  • 11
  • 28

1 Answers1

3

You cannot simply prevent this. The commit hash of for your submodule is stored in a file, so if you change that commit hash in two branches of your super-project, then you will inevitably have a merge conflict.

If you need to change the submodule for every commit however, then maybe your submodule shouldn't have been a submodule in the first place. You can look here on how to merge a submodule into the parent tree.

Also: take a look here on how to manage conflicts with submodules.

Chris Maes
  • 35,025
  • 12
  • 111
  • 136