When I'm working on a project, sometimes my machine requires specific changes to a config file or two, or many. Currently, I have these changes stored in a local branch: local-settings
.
Then, when I need to do a bug fix and test, I do a pull from remote and get latest. I create my new-branch
and then I merge local-settings
into new-branch
and do a git reset HEAD~1
to "undo" the merge commit. From there I only stage and commit my bug fix files.
Is there any damage with doing things this way, and is there a better way of persisting local changes that I need long-term? I've seen other questions mention git stash
, but that wipes out the stashed changes once they are popped, correct? That doesn't seem like a good solution for me.
Thanks!