1
========================
2
Using Breezy with GitHub
3
========================
5
GitHub: the largest code-hosting site
6
-------------------------------------
8
This tutorial looks at how Breezy and GitHub can be used together.
10
Accessing code in GitHub using Breezy
11
========================================
13
Getting the code for a project
14
------------------------------
16
Breezy users can grab code from GitHub using regular GitHub URLs:
18
brz branch git://github.com/owner/name
20
where `owner` is the name of the owner and `name` is the repository name. Here are some examples::
22
brz branch https://github.com/inkscape/inkscape
23
brz branch git://github.com/KDE/amarok
24
brz branch https://github.com/python/cpython
26
You can then browse the code locally using your favorite editor or IDE and
27
change the code if you wish.
29
To access a non-default branch, specify the 'branch' segment parameter::
31
brz branch https://github.com/inkscape/inkscape,branch=backports
33
Publishing your changes
34
-----------------------
36
Having fixed that annoying bug or added that cool feature you've always
37
wanted, it's time to impress your friends and make the world a better
38
place by making your code available to others. As explained earlier,
39
GitHub is a code hosting service so you can push your
40
branch to it and others can access your code from there.
42
In the GitHub web UI, you can create a "fork" of an upstream repository. For
43
example, if user "jelmer" forked the inkscape repository at
44
https://github.com/inkscape/inkscape then the fork would be at
45
https://github.com/jelmer/inkscape.
47
You can then push your changes to a branch like this::
49
brz push git+ssh://github.com/jelmer/inkscape,branch=my-branch
51
Others can then download your code like this::
53
brz branch git://github.com/jelmer/inkscape,branch=my-branch
56
Associating branches with GitHub issues
57
---------------------------------------
59
The standard Breezy bugtracking functionality can also be used for GitHub
62
When you commit using Breezy, use the --fixes option like this::
64
brz commit --fixes github:inkscape/inkscape/1234
66
where 1234 is the bug ID. This will add some metadata to the commit message.
68
You can also define a short name for a specific project, by adding an alias for
69
a project. For example, to add an alias for dulwich::
71
brz config bugtracker_dulwich_url=https://github.com/dulwich/dulwich/issues/{id}