Git sync same branch in two repositories which are cloned from same master
I am trying to implement Git in my company. I decided to implement this model http://nvie.com/posts/a-successful-git-branching-model/
There are three branches in main repo, ie master,develop and feature1. There are two developer named Alice and Bob. Both developers are working on the clone of main repo. Both of them working in feature1 branch. Alice has defined a Git remote, named bob, pointing to Bob’s repository, and vice versa.
How can i make get Bobs changes on feature branch to Alice and vice versa?
One Solution collect form web for “Git sync same branch in two repositories which are cloned from same master”
The “A successful Git branching model » nvie.com” comes with a set of tools called “git-flow” on top of your default git installation.
This utility provide some interesting commands to deal with features. Thus Bob or Alice or anyone else can create a new feature and publish it to the main repository:
git flow feature start <name> git flow feature publish <name>
Then Bob and Alice have to track and pull the newly created feature:
git flow feature track <name> git flow feature pull <remote> [<name>]
And then Bob and Alice can use everyday git basics to pull (resp. push) changes from (resp. to) the main repository.
Once the feature is finished you have to tell it to git-flow and delete the feature branch from the main repository:
git flow feature finish <name> git push origin :<name>