I’ve got a git submodule in my project that consists of a set of configuration files, which then need a tiny bit of tweaking on a per-project basis.
Is it possible to do this with submodules, or am I doing things the wrong way here? Obviously I don’t want to commit back the changes to the submodule’s repository, as they’re project-specific.
Any tips or pointers would be much appreciated.
EDIT: Note that these local edits are local to the project, and the project needs to retain these changes when it gets deployed to the server (using git and fabric).
It is possible to make local changes, but it’s not really feasible.
Git will notice that the submodule has changes, and will show that to you. You cannot commit the changes submodule in the supermodule, because those changes are not pushed somewhere. So when someone tries to checkout that submodule, git will complain, because it can’t find the commit that has recorded for that submodule.
If it’s a per project and not a per-machine difference, you can create a branch in the submodule repository where the project specific changes are made. These changes then can be commited to the submodule and be pushed.
You have to decide for yourself if you want these changes be a part of the submodule repository, but this is the only way you can do it with git.