Fetching on a bare repo [message #1622929] |
Wed, 18 February 2015 20:57 |
Giovanni J Messages: 15 Registered: November 2014 |
Junior Member |
|
|
Hello I have a bare repository which acts as broker between a locally shared repository (filesharing between two workstations) and a remote one (bitbucket).
It works quite good, I'm able to push changes without problems. Every change is automatically deployed first on the local repo then on the bare one which in turn handles the Upstream push towards bitbucket.
The bare repo contains 2 branches: A remote and a local one. In the "Configure Branch" tab, the local branch is linked to the remote.
The only problem occurs if I commit a change on the bitbucket directly (e.g using the web interface), since while fetching, the change is not deployed to the local branch, it remains stuck on the remote branch of the bare repo.
Indeed, when I click on "Fetch from Upstream" the remote branch gets updated but the local one doesn't.
It's like they're not bound altogether for fetching.
Checking the references i just have FETCH_HEAD instance.
Any help?
Let's try to figure out... is merge not occurring in a bidirectional way? I mean it works while pushing but it doesn't while fetching.
[Updated on: Wed, 18 February 2015 21:02] Report message to a moderator
|
|
|
|
Re: Fetching on a bare repo [message #1622996 is a reply to message #1622967] |
Wed, 18 February 2015 21:57 |
Giovanni J Messages: 15 Registered: November 2014 |
Junior Member |
|
|
Well I'll try to explain why I want to implement such concept.
I have 2 workstation: MASTER and SLAVE and i'd like to share a git repo between them. In order to do that I set up a shared folder and created a branch.
Now the situation is getting tangled, since I also have a remote repo on bitbucket and I only want to authorize MASTER to push to that online repository.
Then I created a bare repo to link both: the shared branch with the remote one.
This's the pushing data-flow:
SLAVE:shared-->MASTER:shared->MASTER:bare-->REMOTE:BITBUCKET
Pushing operations work, instead, feching ops don't.
In particular, the problem is tied with MASTER:bare.
MASTER:bare is made out of 2 branches: REMOTE and LOCAL, when i try to fetch the REMOTE, it gets updated while changes are not reflected on LOCAL, it remains stale.
[Updated on: Wed, 18 February 2015 21:59] Report message to a moderator
|
|
|
|
Re: Fetching on a bare repo [message #1623683 is a reply to message #1623020] |
Thu, 19 February 2015 08:51 |
Giovanni J Messages: 15 Registered: November 2014 |
Junior Member |
|
|
MASTER is a Workstation
SLAVE is a Workstation
Each workstation has a local git repository - with its own Working dir.
MASTER --> master-local.git = Branch: project, Remote:BARE
SLAVE --> slave-local.git = Branch: project, Remote:BARE
Both repo's have a unique local branch called: project
Now, the two local repo's point to another git repo that's BARE, basically the BARE one is defined as remote for both master-local.git and slave-local.git.
The BARE repo is stored in a shared folder (under Windows) thus both MASTER and SLAVE have access to it as Remote entity. Moreover I can control the BARE repo only from the MASTER workstation which it's linked to.
SHARED FOLDER--> bare-repo.git -> Branch: project, REMOTE:bitbucket
The Bare repo has a branch called project like the other two and its Remote instance points to a bitbucket repository.
So far, you have got a backdrop of my architecture and what's the problem you could wonder.
Well, when I push a change from SLAVE in smoothly lands on MASTER, then just in case, i can push it further towards bitbucket (push to Upstream on the Bare repo) with no problems at all.
But if I change something remotely, let's say on bitbucket directly... the change is not reflected back to the project branch of the Bare repository then the chain is interrupted.
I should merge the remote branch of the BARE to the local branch of the BARE as well.
I know it's quite complicated... i hope it helps.
[Updated on: Thu, 19 February 2015 10:30] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03609 seconds