git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: auto-merge after push?

From
Jakub Narebski <jnareb@gmail.com>
Date
May 11, 2009, 14:35 UTC
Message-ID
<m34ovrn1ww.fsf@localhost.localdomain>
In-Reply-To
<20090511142326.GA18260@redhat.com>
"Michael S. Tsirkin" <mst@redhat.com> writes:
Show 11 quoted lines
> Hi!
> 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

In general this is not possible, because pull can result in merge conflicts, which you cannot resolve without access. Why not push into remotes, and when you are on second machine, complete pull by merging changes? See GitFaq (or GitTips, I don't remember which) where such approach is described in more detail.

-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Michael S. TsirkinNext: Johannes Schindelin
Message 2 of 18 in “auto-merge after push?”
  1. Michael S. TsirkinMay 11, 2009
  2. Jakub NarebskiMay 11, 2009
  3. Johannes SchindelinMay 11, 2009
  4. Michael S. TsirkinMay 11, 2009
  5. Johannes SchindelinMay 11, 2009
  6. Michael S. TsirkinMay 11, 2009
  7. Johannes SchindelinMay 11, 2009
  8. Michael S. TsirkinMay 19, 2009
  9. Michael S. TsirkinJun 11, 2009
  10. Michael S. TsirkinJul 11, 2009
  11. Johannes SchindelinJul 12, 2009
  12. Junio C HamanoJul 12, 2009
  13. Johannes SchindelinJul 12, 2009
  14. Michael S. TsirkinJul 15, 2009
  15. Junio C HamanoJul 15, 2009
  16. Michael S. TsirkinJul 15, 2009
  17. Johannes SchindelinJul 16, 2009
  18. Johannes SchindelinMay 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.