git help
Stefan Bader
stefan.bader at canonical.com
Mon Aug 30 14:42:21 UTC 2010
On 08/30/2010 04:09 PM, manoj.iyer at canonical.com wrote:
>
> I normally do
>
> git fetch origin; git rebase origin
While probably correct I would use the explicit version for the rebase
git rebase origin/master
In that form the target is the target to rebase to. While with --onto
the target follows the onto and the second argument is the starting point.
I am not exactly sure what @{1} will result in exactly (I believe it could
follow history of pushes) but its definitely not what you want.
You want the commit which was the head when you branched or was the head to
which you rebased last (this would be git merge base <yourbranch> origin/master
but that is what the short form does. Or you look up the first commit in git log
which is not belonging to your patch set and use this in
git rebase --onto origin/master <sha1>
Stefan
>
>
> Cheers
> --- manjo
>
> On Mon, 30 Aug 2010, Daniel Hollocher wrote:
>
>> Hey folks,
>> I'm trying to learn git and follow the kernel git guide:
>> https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide
>>
>> I'm having trouble with the rebase command:
>> Preserve Local Changes
>>
>> git fetch
>> git rebase --onto origin/master origin/master@{1}
>>
>>
>> Can someone verify the correctness of the command and/or explain the
>> error message that I'm getting?
>>
>> ubuntu-lucid$ git rebase --onto origin/master origin/master@{1}
>> fatal: Needed a single revision
>> invalid upstream origin/master@{1}
>>
>> The fatal error might be ignorable since I have eliminated all changes
>> by running `git reset --hard origin/master`, but the other one might
>> be a typo?
>>
>> Thanks,
>> Dan
>>
>> --
>> kernel-team mailing list
>> kernel-team at lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>>
>
More information about the kernel-team
mailing list