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

Re: Help merging two repo without connection

From
SRSverre Rabbelier <alturin@gmail.com>
Date
Nov 16, 2008, 15:06 UTC
Message-ID
<bd6139dc0811160706l4dfad335wc4048cd3cfca80ec@mail.gmail.com>
In-Reply-To
<AB681AEE-D229-4F1C-8D7B-8E60E0ED8E96@web.de>

On Sun, Nov 16, 2008 at 15:59, Luca Siciliano Viglieri <lsiciliano@web.de> wrote:

Show 9 quoted lines
> Hi,
> i'm trying to keep synched two repositories without always having a  direct
> connection.
> My situation is the following:
> I have a project on my computer with GIT repo.
> Another developer visited me and cloned my repository connecting the two
> computer (for example via  SSH).
> Than i sent him for the next days patched of my changes but when he came and
> we merged i got the following tree:

I suspect 'git rebase' might help you out. When you apply the patches, apply them to the branch they were based off (instead of to the most recent master), and then rebase -that- branch (with your 'git am'-ed patches from your other box) onto your most recent master. That way you should be able to keep a linear history :).

-- 
Cheers,

Sverre Rabbelier
Previous: Luca Siciliano ViglieriNext: Peter Harris
Message 2 of 3 in “Help merging two repo without connection”
  1. Luca Siciliano ViglieriNov 16, 2008
  2. Sverre RabbelierNov 16, 2008
  3. Peter HarrisNov 16, 2008

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.