Multiple Clients / Bare Repository

178 views
Skip to first unread message

Bonobo Git Server

unread,
Nov 23, 2013, 3:14:38 AM11/23/13
to bonobo-g...@googlegroups.com
I've got 2 GIT clients trying to push to the same repository. I can pull from each other and thus make them synced between them. Each one is currently working in its own independent 'master' branch.

The issue, as I've identified it, is they both call it "master" but they're actually different branches. If I push to the server (let's call it origin) with --mirror, from either one, it will go through. Then I push without mirroring from the other one, and I get this issue: http://stackoverflow.com/questions/2816 ... -checked-o

The point is, I believe I shouldn't keep using mirroring because, and I haven't tried this, I suppose if I need to pull back, or to a new machine, it will be copying a wrong structure. Let's say machine A mirrors itself into the origin, while it's working on branch A. Then machine B, who is working on branch B, wants to pull / fetch from origin to update stuff, or whatever. In this supposition, it will then be in branch A.

Sure, I could just checkout to branch B, but the point is this has potential workflow flaws.

So, looks like the proper way to go with this is using a bare repository on the server. And I couldn't find how to do this on bonobo. Is this a bug or feature suggestion? Or is this something I should be approaching in a different way?

Jakub Chodounský

unread,
Nov 23, 2013, 3:14:51 AM11/23/13
to bonobo-g...@googlegroups.com
The Bonobo Git Server should create bare repositories on the server side so this feature is already implemented and bare repositories are created by default.

Bonobo Git Server

unread,
Nov 23, 2013, 3:15:30 AM11/23/13
to bonobo-g...@googlegroups.com
Well, I've been able to work around this issue for some time now, but I didn't want to post until being absolutely sure it works.

In fact, I'm still unsure if these 3 points I found out were always the issue, but it's all I've got until now. Meaning, approaching these 3 issues I've been able to keep using bonobo without further troubles:

1. git commit --ammend

I use this from time to time and I'm pretty sure, if you push a commit then ammend it and try to push it again, it will not be accepted. The only way I found around this issue is overwriting the push with the push --mirror

2. checkout older commits

If there's a branch both local and in the server but my local branch is somewhere in the history before the same branch in the server, the push will fail. This has a simple solution: checkout the newest or newer commits than what's been pushed. 

3. conflicts

As you said, merging. But not using separate branches (for whatever you meant there, I didn't really get it). If the same branch (usually the master) is in different places because one machine pushed it to the server without merging first, then the other machine has to pull, merge and then it will be able to push just fine. This is where I think it gets really weird... In a bare repository, from what I understand, merging shouldn't be needed because it would not keep a consistency track of branches or tags, it'd just register where they are.


So, that was the kind of thing I was hoping someone to tell me... Yet, I couldn't find this kind of info anywhere!
Reply all
Reply to author
Forward
0 new messages