Reputation: 133
Essentially what I'm looking for is a way to treat each feature branch as a separate repository, as follows in this sample workflow:
1) If my active branch is Feature A, and I have "foo.cpp" modified and want to checkout Feature B, I want SmartGit to automatically stash my changes upon doing so.
2) Piddling around in feature B and then returning to feature A, I want it to stash my changes to feature A, then apply (and likely drop) the feature A stash created in at the tail of step 1.
Is there any way to do this automatically, or am I asking for something ridiculous?
Upvotes: 3
Views: 1120
Reputation: 17443
SmartGit does not assign stashes to certain branches, but you can simply commit your modifications in A as a temporary WIP (work-in-progress) commit, then switch to B, continue working there, finally commit your changes again as WIP and switch back to A. Now you have several choices:
Personally, I prefer the last choice, because having several WIP commits lets me better review my progress (and see possible back-and-forth I did when switching between tasks).
Upvotes: 4