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

Re: merging bare repository

From
Jeff King <peff@peff.net>
Date
May 13, 2011, 13:54 UTC
Message-ID
<20110513135412.GA6920@sigill.intra.peff.net>
In-Reply-To
<533718318.20110513145132@gmail.com>
On Fri, May 13, 2011 at 02:51:32PM +0400, Ilya Basin wrote:
Show 23 quoted lines
> on server:
>     [git@server]$ git clone --bare ssh://git@some.org/git/project.git /git/project.git
> 
> on workstation:
>     [me@client]$ git clone ssh://git@server/git/project.git
>     [me@client]$ cd project
>     [me@client]$ touch aaa
>     [me@client]$ git add aaa
>     [me@client]$ git commit aaa -m abracadabra
>     [me@client]$ git push
> 
> back on server:
>     [git@server]$ git log
>     commit e5c871122cadfa4ed4d2ab488852ecdb803b4bd8
>     Author: Ilya Basin <>
>     Date:   Fri May 13 13:39:39 2011 +0400
> 
>         abracadabra
> 
> I want to merge with upstream
>     [git@server]$ git fetch
>     [git@server]$ git merge origin
>     fatal: This operation must be run in a work tree

Yeah, you need a work tree to do a merge, as there may be conflicts. Moreover, you can't just do the merge via something like cron, as you may need user intervention to resolve the conflicts.

So from your workstation, you'll want to do:
  git remote add upstream ssh://git@some.org/git/project.git
  git pull upstream
whenever you feel like merging with upstream.
-Peff
Previous: Magnus Bäck
Message 6 of 6 in “merging bare repository”
  1. Ilya BasinMay 13, 2011
  2. Magnus BäckMay 13, 2011
  3. Enrico WeigeltMay 13, 2011
  4. garyc618May 31, 2011
  5. Magnus BäckJun 6, 2011
  6. Jeff KingMay 13, 2011

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.