views:

82

answers:

1

Hi all,

I have a project which contains different components that everyone works on. We have a server-side component, and N amount of client components that interact with the server. I myself am responsible for one of the client components.

I'm at a point where I'd like to branch off to develop new features for the client. The problem here is that while I'm updating the client, I'd like to do the following:

a) Make sure all server-side updates that are being made by colleagues make their way to my experimental branch. b) Push my experimental branch to a shared repo so folks can see the work I've been doing. c) Merge back into master branch when features are done.

What's the best strategy for this particular workflow when working with a shared repo?

Thanks for your solution(s).

A: 

The standard workflow works like that:

  1. git clone to create your local repository.
  2. create a tracking branch of origin/master.
  3. create your branch off of your local tracking branch.

Now to fulfill:

  1. condition a) you can pull from the origin repository. This will make a changes to your local tracking branch. If it is ok. Do git merge or git rebase to import the changes of other people to your branch.
  2. condition b) use git push to send your branch on the shared repository.
  3. condition c) when you are done with your branch merge it to the master branch and push it to the shared repository.

This is the simplest way of doing things.

You may also use private/public repository for everyone. Look at some workflow proposal for Git. In this case, you get rid of the pushing and only use pull/merge.

Pierre