Remote tracking branches not updated [message #789928] |
Fri, 03 February 2012 15:37 |
camille chambon Messages: 2 Registered: February 2012 |
Junior Member |
|
|
Hello,
I have a remote git repository named remote_repository.git. This repository has 2 non-empty branches: origin/master and origin/test.
I clone remote_repository.git 2 times, creating 2 local repositories: developer_1_local_repository.git and developer_2_local_repository.git. For both of them, I import the 2 existing branches: origin/master and origin/test.
In the master branch of developer_1_local_repository.git, I add a file test.txt. I commit the local master branch, and push the commit to origin/master branch of remote_repository.git. The origin/master branch should now contain test.txt.
I refresh all repositories in the "Git Repositories" view.
In the "Git Repositories" view, when I checkout developer_1_local_repository > Branches > Remote tracking > origin/master, I CAN see test.txt in the Working directory.
BUT, when I checkout developer_2_local_repository > Branches > Remote tracking > origin/master, I CAN NOT see test.txt in the Working directory.
Why ???
Thanks in advance.
Camille
|
|
|
|
Re: Remote tracking branches not updated [message #790525 is a reply to message #789928] |
Sat, 04 February 2012 11:44 |
camille chambon Messages: 2 Registered: February 2012 |
Junior Member |
|
|
Hello, and thanks for your answer.
Quote:You don't see the change in your second local clone because you never fetched it from the origin into that clone.
So I just have to fetch developer_2_local_repository.git in the "Git Repositories" view, and I will see test.txt? I will try as soon as possible.
Quote:Also, there's almost never any reason to checkout a remote-reference like origin/master. These are only useful for tracking changes in another repository.
So maybe I'm not using Git in a good way for what I want to do.
In fact, we are several developers: developer_1, developer_2 and developer_3. We decide that each developer has one or several role(s) among: modelisator, scientific_validator or computer_validator.
Let's say that developer_1 is a modelisator, developer_2 is both modelisator and scientific_validator, and developer_3 is computer_validator.
The scientific_validator checks the modelisator work, and the computer_validator checks the scientific_validator work.
Thus I create a remote branch for each developer and a master branch. The remote branches are therefore: origin/developer_1, origin/developer_2, origin/developer_3 and origin/master.
According to developers' roles, we decide the following development cycle:
- developer_1 wants to add modifications to the source code. Thus developer_1 fetches origin/master to his local master branch. Then developer_1 merges his local master branch with his local developer_1 branch. Then developer_1 modifies his local developer_1 branch, commits it, pushes it to origin/developer_1 branch, and notifies developer_2.
- developer_2 wants to check developer_1 work. Thus developer_2 fetches origin/developer_1 branch to his local developer_1 branch. Then developer_2 checks his local developer_1 branch, and corrects it if needed. When the local developer_1 branch seems to be fine, developer_2 merges it to his local developer_2 branch. Finally, developer_2 commits his local developer_2 branch, pushes it to origin/developer_2, and notifies developer_3.
- developer_3 wants to check developer_2 work. Thus developer_3 fetches origin/developer_2 branch to his local developer_2 branch. Then developer_3 checks his local developer_2 branch, and corrects it if needed. When the local developer_2 branch seems to be fine, developer_3 merges it to his local master branch. Finally, developer_3 commits his local master branch, pushes it to origin/master, and notifies all developers.
I agree that could look very complicated, and that there is maybe a smarter and easier way to do the same. But I can't find it.
So...
- is it possible to manage our source code the way I described?
- is there an easier or/and smarter way?
Many thanks in advance.
Camille
|
|
|
Powered by
FUDForum. Page generated in 0.03360 seconds