Hi,

On Thu, 24 Jan 2008, Kirill wrote:

> On Jan 24, 9:55 am, Johannes Schindelin <[EMAIL PROTECTED]>
> wrote:
>
> > On Thu, 24 Jan 2008, Kirill wrote:
> > > I've just pushed two patches to mob:
> > > - minor modifications to build with VS2005;
> >
> > Your commit messages are not easily readable for me, since they extend 
> > well over the 76 characters that I can read with the 4-space indent of 
> > "git log".  Please fix.
>
> Oops. Sorry. Could you please help me with "fixing" it? Basically, you 
> step-by-step help with "push to mob" was great; can I ask the same for 
> "fixing bad commit messages after push"?

Well, since I do not consider "push to mob" to be something like 
"publish", it is not too late at all to amend that commit.  Here's how:

        $ git rebase -i HEAD~2

This asks for a list of the last two commits (in a linear history, 
anyway), and you can mark the one to amend as "edit" (just change the 
"pick" into "edit").  After saving and quitting the editor, it will send 
you back to the state when that commit was done.  Now amend it:

        $ git commit --amend

Fix the linewrap, save and exit.  Now you amended that commit, but to come 
back at where you were (but now with an amended commit in the middle), say

        $ git rebase --continue

Another recipe: this time for creating a patch for review.  Or in your 
case, two patches.

        $ git format-patch -2

This will create two files (because of the -2) in mbox format.  Paste them 
into your mail program, one at a time, editing out the "mbox" headers (and 
putting the subject where it belongs).  Send.  Wait for comments ;-)

Hth,
Dscho

Reply via email to