[pacman-dev] git help - Was : [PATCH 1/2] Enabled new interactive prompt and updated some tests.

Aaron Griffin aaronmgriffin at gmail.com
Mon Feb 23 10:55:27 EST 2009


On Sun, Feb 22, 2009 at 10:20 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> On Sun, Feb 22, 2009 at 10:14 PM, Allan McRae <allan at archlinux.org> wrote:
>> Dan McGee wrote:
>>>
>>> I never use git-merge when doing my own work, btw- I'm really not sure
>>> that makes workflow easy at all, as I tend to cherrypick things around
>>> on multiple working branches if I want to move patches.
>>>
>>
>> So while we are getting git tutorials, do you mind giving an example command
>> that does this.  I always end up in a mess when trying to do that...
>
> OK. So I'm busy reintegrating some of your guys' stuff into [master],
> when I see a problem that I need to fix. I go ahead and fix it, make
> my own commit...and then realize this fix should be on [maint].
>
> git log, look for the sha1 commit ID of the commit I want to move
> git co maint
> git chp <sha1>
> profit!
>
> co? chp? what are those, you ask? git aliases are awesome:
>
> $ git config --list
> alias.co=checkout
> alias.chp=cherry-pick
> alias.b=branch
> alias.m=merge
> alias.rf=checkout HEAD
>
> I think it is something like "git config alias.co checkout".
>
> I'd then go back and remove that commit from [master]. If it was still
> the last thing I did, I'd "git reset --hard HEAD^". If it was further
> back, rebase -i to the rescue and just delete the line.

So when you cherry-pick, you actually then remove the commit from the
original branch and rebase? I never thought of it that way, that
actually cleans up some confusion I had with cherry-pick to begin
with.


More information about the pacman-dev mailing list