Hi,

I'm working on a new project that is moving towards using a clone of the 
OpenStack infrastructure to manage its source and continuous integration.

We are newbies to git (we are used to svn), and have a question about master 
branches.

On https://wiki.openstack.org/wiki/GerritWorkflow, it describes cloning a git 
repository, and keeping the local master up-to-date with the origin master. 
They then create their local branches off of that local master (e.g., using git 
checkout -b <branch>), and check in locally then submit changes to gerrit via 
git review.

One of our engineers asks:

"Why should we advise people to keep their master branch as a copy of the 
master branch in gerrit/github, when they already have an exact copy of it? The 
remote branch is origin/master.  We should just have people branch directly 
from that rather than merge it onto their own master, which might have other 
changes.

git fetch origin                                                  # gets the 
code, no need to merge it
git checkout -b <branch> origin/master          # branch from official master, 
not my local master

Same thing works when updating existing branch:

get fetch --all
git rebase origin/master

This seems a more straight-forward way of working, rather than pulling to the 
master branch and then branching from there."

So, we are wondering, why does OpenStack not use the origin/master branch 
directly? I'm wondering if there are implications for how gerrit works? Or 
perhaps it makes a local developer repository more tightly coupled to the 
central repository somehow?

What are your thoughts?

Thanks and kind regards,

Dave

_______________________________________________
OpenStack-Infra mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra

Reply via email to