git-svn users: please squash commits on branch merge
Leo Franchi
lfranchi at kde.org
Sun Jul 5 11:04:13 CEST 2009
On 5 Jul 2009, at 02:05, Ian Monroe wrote:
> On Sat, Jul 4, 2009 at 7:26 PM, Soren Harward<stharward at gmail.com>
> wrote:
>> For those of you what are using git-svn, when you merge a branch back
>> into the main tree to get it ready for an SVN commit, could you
>> please
>> squash your merge history so that you don't end up with a new SVN
>> commit for each git commit? I really don't think it's necessary to
>> have the entire work history of your private branch put into the
>> public SVN; that's kind of the point of the private branch. Just big
>> commit is a lot easier to review, and is kinder to SVN.
>>
>> If you don't know what I'm talking about, here's what your workflow
>> probably looks like:
>>
>> [finish work on mybranch]
>> git checkout master
>> git merge mybranch
>> git svn dcommit
>>
>> Please do this instead:
>>
>> [finish work on mybranch]
>> git checkout master
>> git merge --squash mybranch
>> [edit the commit message so that it's appropriate the whole commit]
>> git svn dcommit
>
> Alternatively you can do the work in master, but then squash
> everything together with git rebase -i.
>
> I agree folks probably should squash things.
I dont think everyone needs to totally squash their branch. I don't
want to drop a massive commit all at once, then reverting anything
becomes impossible etc.
You can however interactive rebase over a branch, and squash
unimportant commits into more important ones, leaving only the big
commits there.
git rebase -i git-svn
then you can choose which commits to squash, edit the merged commit
messages, and then git svn dcommit up to svn.
leo
More information about the Amarok-devel
mailing list