Information Technology Reference
In-Depth Information
You work as one of developers in a large project. To synchronize the work, the whole
team uses a shared repository with remote branches. In this recipe we will use the fol-
lowing settings:
10-07/leaders-repo —a non-bare repository of a project's leader
10-07/johns-repo —your non-bare repository
10-07/shared-repo —a bare repository used for synchronization
You are responsible for the work on a new web interface. You plan to share your
work with the team using a branch named new-web-interface . In particular, you
want to:
• Create a local branch named new-web-interface
• Commit in your local branch new-web-interface
• Push your local new-web-interface to a shared repository to be re-
view by the project leader
Solution
Create a new directory and initialize a leader's repository:
$ cd git-recipes
$ mkdir 10-07
$ cd 10-07
$ git init leaders-repo
$ cd leaders-repo
$ git simple-commit "Initial commit"
Next create a shared repository:
# command issued in git-recipes/10-07 directory
$ git clone --bare leaders-repo shared-repo
The leader needs to add the origin alias in his or her repository:
Search WWH ::




Custom Search