I hope the title doesn’t confuse too much, I’ll try to explain the issue I’m having in more detail here:
Suppose you have a repository with a code file (e.g. "main.py") and a setup file (e.g. "setup.env"). Now, the code is universal for everyone working on the repository, but the setup is specific to every contributor. For this example lets say ignoring the setup file and moving the setup in a separate submodule is not an option.
If we now make two branches called "feat-code" and "feat-setup" for the universal and personal changes each, is it possible to have the current HEAD on both branches at once? This would effectively merge both histories, without actually merging and creating a commit.
>Solution :
You can’t do that at once, however you can have separate git repository for personal setup. Personally I wouldn’t recommend that.
Usually when setup is stored in git repo, it is template, which has to be changed individually. They are added to .gitignore file, so don’t worry about changes. If you create new, remember to add it to .gitignore before personalizing it.