Re: [dev] sbase/cal patch for Julian calendar

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Tue, 13 Jan 2015 18:50:24 +0000

On Tue, Jan 13, 2015 at 01:15:54PM -0500, Greg Reagle wrote:
> Greetings. I made this change in two stages hence two commits, but I
> think it makes more sense to combine them into one commit.
> Unfortunately, I am not a master of git and I don't know how. I can use
> git diff to combine the changes, but git format-patch wants to do one
> patch per commit.
>
> It is attached.

Thanks!

There are basically two ways of doing this:

a)

git reset HEAD~2
git add -u .
git commit

This is the easier way of doing it but it is limited. With method
b) you can squash together two arbitrary commits not just the two top ones.

b)

git rebase -i HEAD~2

An editor will pop up, find the top/HEAD commit
and change the first word from 'pick' to 's', then save
and exit. The editor will pop up again and you will provide
a single commit message, save and exit. Now you have a single
commit that you can use git format-patch on.

's' stands for 'squash' in this case.

Hope this helps,
sin
Received on Tue Jan 13 2015 - 19:50:24 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 13 2015 - 20:00:10 CET