Suppose that I have the follwoing folder structure:
My Project
| - <project files>
| - <project configuration files>
Every developer has different project configurations and wants to store these files on a separate branch.
It is then possible add these configurations into the branch you are working on by doing this:
# Get the configurations
git checkout jakesConfigurationFileBranch -- <project configuration files>
# Don't stage these files for commit
git reset -- <project configuration files>
Unfortionatly this workflow isn't working great because we have configuration files scattered accross our project (our project config files, Editor preferences, etc). IE:
My Project
| - <project files with configuration files sprinkled throughout>
What I would really like to is merge in a branch without changing the history or staging the files.
git merge --files-Only jakesConfigurationFileBranch
Before running the command the tree would like like this:
master
/
*---*---*
\
*--* - jakesConfigurationFiles
And after the tree would look the same:
master
/
*---*---*
\
*--* - jakesConfigurationFiles
There is a flag called --no-commit on merge but it will perform a fast-foward merge so this doesn't always work (and won't block the pointer from being moved).