0
$\begingroup$

Rosanswers logo

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!


Originally posted by silgon on ROS Answers with karma: 649 on 2014-06-21

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by tfoote with karma: 58457 on 2014-06-22

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

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).


Originally posted by 130s with karma: 10937 on 2014-06-22

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.