Note that there are some explanatory texts on larger screens.

plurals
  1. POIs this scatter-brained workflow realizable in Git?
    text
    copied!<p>This is what I'd like my workflow to look like at a conceptual level:</p> <ol> <li>I hack on my new feature for a while</li> <li>I notice a typo in a comment <ul> <li>I change it</li> <li>Since the typo is completely unrelated to anything else, I put that change in a pile of comment fixes</li> </ul></li> <li>I keep working on the code</li> <li>I realize I need to flesh out a few utility functions <ul> <li>I do so</li> <li>I put that change in its own pile</li> </ul></li> <li>Steps 2, 3, and 4 each repeat throughout the day</li> <li>I finish the new feature and put the changes for that feature in a pile</li> <li>I push nice patches upstream: One with the new feature, a few for the other tweaks, and one with a bunch of comment fixes if enough have accumulated</li> </ol> <p>Since I'm both lazy and a perfectionist, I want to be able to do some things out of order: I might correct a typo but forget to put it in the comment fix pile; when I prepare the upstream patches (I'm using git-svn, so I need to be pretty deliberate about these), I'll then pull out the comment fixes at that point. I might forget to separate things altogether until the very end. But I might /also/ have committed some of the piles along the way (sorry, the metaphor is breaking down …).</p> <p>This is all rather like just using Eclipse changesets with SVN, only I can have different changes to the same file in different piles (having to disentangle changes into different commits is what motivated me to move to git-svn, in fact …), and with Git I can have my full discombobulated change history, experimental branches and all, but still make a nice, neat patch.</p> <p>I've just recently started with Git after having wanted to for a good while, and I'm quite happy so far. The biggest way in which the above workflow doesn't really map into Git, though, is that a “bin” can't really be just a local branch, since the working tree only ever reflects the state of a single branch. Or maybe the Git index is a “pile,” and what I want is to have more than one somehow (effectively).</p> <p>I can think of a few ways to approximate what I want (maybe creative use of stash? Intricate stash-checkout-merge dances?), but my grasp on Git isn't solid enough to be sure of how best to put all the pieces together. It's said that Git is more a toolkit than a VCS, so I guess the question comes down to: How do I build this thing with these tools?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload