Git development branches

Andreas Pakulat apaku at gmx.de
Thu Jan 6 15:39:08 UTC 2011


On 06.01.11 16:15:48, Benjamin Port wrote:
> Hello,
> When we worked with gitorious we have our development branches under a
> team repository.
> Currently we can't do the same thing with git.kde.org
> So there are two solutions (at least):
> * Create branch under the main repository
> * Create personnal clone
> 
> For me it's more easy to create branch under the main repository:
> *Easy to see quickly all development branch with a git branch -a
> *Easy to switch from one branch to another branch
> *Only one repository to clone

This is true for using a personal clone as well. In fact with a personal
clone you can even quicker see which branches are 'development' ones due to
the output with git branch.

The way to do this is not cloning the personal repository, but adding a
second remote for it in your normal kdevelop repository. So lets say that
clones/kdevelop/apaku/mykdevelop is a personal clone of the kdevelop
repository, then a 

git remote add apaku ssh://git@git.kde.org/clones/kdevelop/apaku/mykdevelop
git fetch apaku

will pull in all branches from apaku into your local clone. Then git branch
-a will show you branches from both the 'origin' repository and the clone
as well.

If you then create a branch and push it to the personal clone, you can
specify the -u option to make git create a connection between the local and
the remote-branch. That way you don't need to remember to list the remote
and can do a simple "git push" from the local branch.

> For this solution I suggest to:
> *Create branch with a name convention like: somestuff-username (e.g.
> qtdocumentation-bport), with this we can know on what a group work and
> also know a "branch maintainer" to contact him.

If the branch is created on a personal clone of the branch-maintainer, then
there's no need for any naming convention....

I don't care too much which way is being used at the end, the ones who
create the branches should decide that, but I did want to clarify the
misconceptions you had about the easyness of using a personal clone.

Andreas

-- 
You can rent this space for only $5 a week.




More information about the KDevelop-devel mailing list