Redoing Commit History in GIT Without Rebase

Posted by yar on Stack Overflow See other posts from Stack Overflow or by yar
Published on 2010-02-23T18:39:08Z Indexed on 2010/05/10 11:24 UTC
Read the original article Hit count: 286

Filed under:
|

Since asking my last question which turned out to be about rebasing with GIT, I have decided that I don't want to rebase at all. Instead I want to:

  1. Branch
  2. Work work work, checking in and pushing at all times
  3. Throw out all of those commits and pretend they never happened (so one clean commit at the end of work)

I do this currently by copying the files to a new directory and then copying them back in to a new branch (branched at the same point as my working branch), and then merging that into master or wherever.

Is this just plain bad and why? More important: Is there a better/GIT way to do this? git rebase -i forces me to merge (and pick, and squash).

© Stack Overflow or respective owner

Related posts about git

Related posts about rebase