Re: how to combine 2 commits?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sitaram Chamarty
Date: Monday, January 12, 2009 - 11:35 pm

On 2009-01-13, bill lam <cbill.lam@gmail.com> wrote:

I tend to make lots of small commits on the work tree, and
having to combine them meaningfully later.

I like using "git rebase -i HEAD~5" (if I want to rebase the
last 5 commits).  In the editor that pops up, I reorder the
ones that I know should be together, and on each set to be
squashed, I change the "pick" to "s" (for squash) on all but
the first one.  Save the file and it's all done.

Works like a charm.  For me, moving commits around in an
editor, deleting them even, is very intuitive.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: how to combine 2 commits?, Sitaram Chamarty, (Mon Jan 12, 11:35 pm)
Re: how to combine 2 commits?, Matthieu Moy, (Mon Jan 12, 11:48 pm)