4 ms·
Yes, git-flow is excellent, but like any branch / commit scheme takes dicipline to follow. I often find myself (on personal projects) fiddling with bits on the
by scoot 13y ago
Yes, git-flow is excellent, but like any branch / commit scheme takes dicipline to follow. I often find myself (on personal projects) fiddling with bits on the 'wrong' branch, as I tend to jump ad-hoc from place to place in the code. Probably itself a discipline problem. :-)
- news_to_me 13y agoI have a similar problem; this is what I do: I keep a dev branch to merge to/from whenever I switch focus. For example, when I'm on branch Feat-A, but I want to make a change related to Feat-B (or I already have but haven't committed), I'll stash my changes, merge Feat-A into dev, merge dev into Feat-B, pop my changes off the stash, and commit. The whole switch goes: - "Oops, these changes don't go on this branch" - git stash - git checkout dev - git merge Feat-A - git checkout Feat-B - git merge dev - git stash pop It takes half a minute, but it keeps my branches clean, and lets me move from feature to feature at will. I may add a 'git oops' alias just for this process.
- scoot 13y agoThank you - I've been meaning to think that process through. I'll be doing this from now on if I'm in the same situation rather than 'ah feck it, commit it'!
- easy_rider 13y agoyepyep, this is also how i roll; stashing and popping!