by malloc47 on 2/19/13, 4:54 AM with 41 comments
by stasm on 2/19/13, 2:48 PM
Create a local branch, apply the sledgehammer, and start reviewing changes. Use 'git diff master...' to review changes. (This is short for 'git diff master...HEAD' which in turn stands for 'compare current branch's HEAD with the commit on master off of which you've branched.) 'git add -p' and commit changes that you like.
Iterate until you're happy with the result. You will have ended up with a few commits on your local branch. Use 'git rebase -i master' to squash all commit in a single one. Finally, check out the master branch and merge your local branch in, preferably with --ff.
by DoubleCluster on 2/19/13, 8:56 AM
by pseut on 2/19/13, 8:53 AM
by niggler on 2/19/13, 5:21 AM
by tmeasday on 2/19/13, 7:13 AM
by gbog on 2/19/13, 3:05 PM
by ibotty on 2/19/13, 9:06 AM
git add -p
everything that is ok. git diff will only show you the differences against the index, so this works as well.by habosa on 2/19/13, 6:17 AM
by zacharypinter on 2/19/13, 3:56 PM
alias gqc="git commit -m 'quick commit'"
The command is usually preceded by "git add ." (or alias "ga."). Making a commit ends up being more reliable for me than stash. Also, the commit stays with the branch, making it easy to switch to master branch, make or check an important change, then go back to what I was working on in the develop branch. Additionally, it makes rebasing a work in progress easier. Just gqc && git pull --rebase.
When it comes time to push, I can just check the log for all the "quick commit" commits. If there's just one, then I make an amend commit. If there's more than one, I rebase interactively.
I suppose I could add a hook to make sure I never accidentally push a quick commit, but it hasn't been an issue yet (over the past year or so I've only made the mistake once).
by twic on 2/19/13, 10:47 AM
by emillon on 2/19/13, 9:52 AM
by minhajuddin on 2/19/13, 7:43 AM
by shurcooL on 2/19/13, 6:53 AM
I've found it useful to be able do diffs of diffs in my work, hence I'm planning to add the ability to do that to my toolset. Combined with live editing, I think it's going to be quite neat.
by wubbfindel on 2/19/13, 2:21 PM
I find it easier anyway. But the stash approach is interesting, thanks for sharing!
by kapuzineralex on 2/19/13, 6:08 AM
by cecilpl on 2/19/13, 9:22 AM