lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git question


From: Johannes Schindelin
Subject: Re: Git question
Date: Wed, 9 Sep 2009 10:32:13 +0200 (CEST)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi,

On Wed, 9 Sep 2009, Michael Käppler wrote:

> Let's assume I've checked out a fresh master/origin and did some commits 
> on top of it. How can I concatenate this commits in one to create only 
> one patch?

The easiest way I can think of: if your latest, say, 5 commits should be 
squashed into one (and none of them is a merge!), call

        $ git rebase --interactive HEAD~5

it will start up an editor with the list of the latest 5 commits; just 
replace the "pick" in the lines 2-5 with "squash" and save the so-called 
"rebase script" and quit the editor.

The rebase will then squash the later commits into the first one, and ask 
you what commit message you want to have for the combined commit (it shows 
you the individual commit messages in an editor, so you do not have to 
write the new message from scratch).

Ciao,
Dscho

reply via email to

[Prev in Thread] Current Thread [Next in Thread]