Re: auto-merge after push?
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 11, 2009, 15:18 UTC
- Message-ID
- <alpine.DEB.1.00.0905111714250.4973@intel-tinevez-2-302>
- In-Reply-To
- <20090511142326.GA18260@redhat.com>
Hi,
On Mon, 11 May 2009, Michael S. Tsirkin wrote:
Show 10 quoted lines
> 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