git and branches
Cyrille Berger Skott
cberger at cberger.net
Wed Dec 15 21:25:30 GMT 2010
Hi,
Seing that you are all getting familiar and at ease with git on IRC :D Lets
move to something more advance. The reason we moved to git is not to be
allowed to work offline, but to work with branches in a more convenient way
than what svn could allow us.
So time to introduce the few commands that allow that:
Create a new branch with:
git checkout -b branch_name
Switch between branches:
git checkout branch_name
And then commit as usual.
Branches can be local, or shared on the server.
to list your local branch you can do:
git branch
to list all branches:
git branch -a
If you want to get a remove branch, simply:
git pull origin branch_name
And if you want a local branch (and/or the commits you have made to that
branch) to be shared on the server, then you do
git push origin branch_name
When you are finished with a branch, you want to have it merged into master,
then you do:
git checkout master
git merge branch_name
And to remove your branch:
git branch -d branch_name
If it was a shared branch, you will need to contact repo's admin (right now,
Ian Monroe, Boudewijn and me, we will probably add more later) to delete the
branch on the server (I have no clue how to do that :) ).
You might also want to keep your branch up to date with the latests master:
git checkout branch_name
git merge master
As usual, if you have any questions, feel free (especially if you are
interested in the git masters to give you a more complicated set of commands
to accomplish the same thing).
And don't forget to name your branches (especially shared one) with the
following convention:
application-topic-contact_person (ie krita-explosion_paintop-berger or flake-
speed_improvement-berger )
--
Cyrille Berger Skott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20101215/92bad004/attachment.htm>
More information about the calligra-devel
mailing list