Often while working on a branch I need to introduce some "temporary" changes (such as additional debugging info, or a change which lets me better observe the thing i'm actually working on).
About these "temporary" changes:
- I want them in my working copy of my branch, because they help me to work on the actual change,
- I don't want them committed to the branch, because the branch is going to be merged into master some time and they're not production code.
Currently I just keep them as unstaged and I skip them manually when staging every commit. However I can't stay with this solution because:
- All the time I have to remember which files I need to skip,
- Someday I'm going to end up with 2 changes in one file, one being temporary, one to be committed, and it's going to be really troublesome.
How should I deal with it?
gitignore
is obviously out of the question because I don't want to ignore the whole files and I'm still interested in changes from other committers (I need to rebase the branch to master from time to time).