git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* merging bare repository
@ 2011-05-13 10:51 Ilya Basin
  2011-05-13 13:53 ` Magnus Bäck
  2011-05-13 13:54 ` Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Ilya Basin @ 2011-05-13 10:51 UTC (permalink / raw)
  To: git

Hi list. Please suggest me a solution. There's a remote repository;
we're not allowed to push to. We have several committers.
So I want to create a local mirrror. We will push our changes to it.
Once in a while I want to sync this repo with upstream.

Here's what I do:

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

I read this article:
http://www.pragmatic-source.com/en/opensource/tips/automatic-synchronization-2-git-repositories
The solution described there doesn't work

If I use --mirror instead of --bare to clone the repo, all local
commits discarded when I fetch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-24  3:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 10:51 merging bare repository Ilya Basin
2011-05-13 13:53 ` Magnus Bäck
2011-05-13 20:56   ` Enrico Weigelt
2011-05-31  2:01   ` garyc618
2011-06-06 21:54     ` Magnus Bäck
2011-05-13 13:54 ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).