Re: auto-merge after push?

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

 



Hi,

On Mon, 11 May 2009, Michael S. Tsirkin wrote:

> I'm working on two machines, and git allows me to switch between them 
> and sync by means of git pull. When one machine is behind a firewall, I 
> can sometimes only do pushes, but then I have to rememeber to merge when 
> I log into remote machine.
> 
> Is there a way to trigger merge on remote after push somehow,
> so that running on local machine:
> >git push remote
> would be equivalent to
> >ssh remote git pull local

How about something like

$ git config alias.reverse-pull '!sh -c "git push remote HEAD:TO_MERGE && \
	ssh remote \"cd directory && \
		git merge TO_MERGE && git branch -d TO_MERGE\""'

?

The thing is, a merge can fail.  And then you already need direct access 
to the working directory in question.

If you were actually talking about fast-forward pushes (because you did 
the merge locally already), this might help you:

	http://thread.gmane.org/gmane.comp.version-control.git/110251

Ciao,
Dscho

--
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]