Ask Your Question
2

groovy-devel, hydro-devel, different git branches architecture question

asked 2014-06-21 10:42:29 -0600

silgon gravatar image

Maybe this is a really general question about git and branches and i could put it somewhere else (stackoverflow) but I would like to know for the developers that are using hydro-devel and groovy-devel (for example) how do you synchronize changes one branch and another. Do you use something like cherry-picking to select exactly what files to synchronize? Can you even use the cherry-picking for merging??? So, what's the usual standard that you use? the question is mainly because when you develop something for some branch and you want to put that utility to the other branch, (i think) you won't do rebase, you will try to merge only some specific files which are not going to mess up some others.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-06-22 22:49:01 -0600

tfoote gravatar image

Yes, the standard way to port code from one development branch to another is to use cherry-pick. Well constructed commits will usually cherry-pick betwen branches relatively easily.

You cannot use merge unless you want all changes. Generally merging is only done to bring feature branches/pull-requests into a development branch and never for crossing between forked development branches.

rebase is super powerful and can be used in many ways. However if the content is already available to others in a public branch it should not be used. It's really for cleaning up local branches/development before pushing content.

edit flag offensive delete link more
2

answered 2014-06-22 17:43:06 -0600

130s gravatar image

updated 2014-06-22 17:46:20 -0600

There should be many people in ROS community who can explain more thoroughly, but here's what I know:

  • To synchronize branches, I think git merge and git rebase (use either one depending on the purpose) is generally preferred to git cherry-pick (ref. from stackoverflow). cherry-pick is useful particularly when you want to sync the specific commits.

  • In ROS, branching per distro seems to be a common practice, e.g. { groovy, hydro, indigo }-devel as you pointed out. Note, however, that you may create a branch for a new ROS distro ONLY when there's a necessity; for instance, while the latest ROS distro is hydro, the latest development branch of rqt_common_plugins remains groovy-devel since all the code there is expected to run on both distributions and thus it reduces the maintainer's effort. This kind of branching policy can vary depending on repositories (and for rqt, it's documented here).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-06-21 10:42:29 -0600

Seen: 508 times

Last updated: Jun 22 '14