Re: Pitfalls in auto-fast-forwarding heads that are not checked out?

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

 



Martin Langhoff wrote:
> On Sat, May 4, 2013 at 3:34 AM, Johannes Sixt <j6t@xxxxxxxx> wrote:

>> Since git 1.8.0 you can express this check as
>>
>>     if git merge-base --is-ancestor $production_sha1 refs/heads/master
>
> Ah, that's great! Unfortunate it's not there in earlier / more widely
> used releases of git.

Another trick is to use "git push":

	git push . $production_sha1:refs/heads/master

This advances the "master" branch if

 (1) it is not the current branch, and
 (2) that update is a fast-forward

It can be convenient sometimes.

Hope that helps,
Jonathan
--
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]