Re: How to do a fast-forward merge without a checkout?

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

 



Am 7/18/2011 16:18, schrieb Patrick Doyle:
> $ git push
...
> To somehost:path/to/repo
>    e1004df..bad8767  wpd -> wpd
>  ! [rejected]        master -> master (non-fast-forward)

[Context: Patrick works on the topic branch, but can't push it anymore
because the unrelated branch master was moved forward by someone else.]

After the obligatory 'git fetch', there are at least two ways to do this:

(1) The quick and unsafe way:

    $ git branch -f master origin/master

(2) The safer way:

    $ git push . origin/master:master

The second command is safer because it checks that origin/master is indeed
a direct descendent of master.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]