{section: Making a single person project into a multiple person project} -Suppose you have a local topic branch called =bname=. These are the commands you would do to push it into the main repository and allow multiple people to work on it. - -{code} -# First, get it into the main repository -$ git push origin bname - -# now rename the local copy to an old version just in case you need it -$ git branch -m bname-old - -# Checkout bname from the origin and track it. -$ git checkout -b bname origin/bname - -# Now you can delete the bname-old when you are satisfied bname is in the -# repository and it is happy. -# git branch -D bname-old -{endcode} - -*NOTE:* Don't forget to document the branch name in the =CVS_Tags= file! +Taking your local project and making it available to others via the central repository involves creating a new public branch. *See GitNewBranchRules for details on this.* {section: Working on a project shared with more than one person} @@ -264,18 +247,22 @@ If you are going to be using a shared branch that already exists you can skip the branch setup steps and move right on to the steps for working on the branch, which are amazingly similar to what you do when working on your own local branch. -{subsection: Make the branch and do bookkeeping} +{subsection: Create the branch and do bookkeeping} Before going any further, you need to make the branch do some bookkeeping. *See GitNewBranchRules for details on this.* -{subsection: Get working} - -At this point you can go hog wild on the branch: +{subsection: Work on a branch someone else created} {code} -# Get the branch created above. +# Get the latest repository information +$ git fetch + +# Make a local copy of the public branch +$ git branch V7_1-GreatFeature-branch origin/V7_1-GreatFeature-branch + +# Check it out. $ git checkout V7_1-GreatFeature-branch # Hack hack hack