-{{>toc}}
-
h1. Git
+{{>toc}}
+
h2. After cloning the repository
After you cloned the repository (using <code>git clone <url></code>) you are ready to start creating a branch to start working.
The current structure looks as follows:
|_.Directory|_.Repository|
|<code>/</code>|git://git.xonotic.org/xonotic/xonotic.git|
+|<code>/bocc</code>|git://git.xonotic.org/xonotic/bocc.git|
|<code>/darkplaces</code>|git://git.xonotic.org/xonotic/darkplaces.git|
+|<code>/mediasource</code>|git://git.xonotic/xonotic/mediasource.git|
+|<code>/netradiant-xonoticpack</code>|git://git.xonotic.org/xonotic/netradiant-xonoticpack.git|
+|<code>/netradiant</code>|git://git.xonotic.org/xonotic/netradiant.git|
|<code>/data/xonotic-data.pk3dir</code>|git://git.xonotic.org/xonotic/xonotic-data.pk3dir.git|
|<code>/data/xonotic-maps.pk3dir</code>|git://git.xonotic.org/xonotic/xonotic-maps.pk3dir.git|
|<code>/data/xonotic-music.pk3dir</code>|git://git.xonotic.org/xonotic/xonotic-music.pk3dir.git|
|<code>/data/xonotic-nexcompat.pk3dir</code>|git://git.xonotic.org/xonotic/xonotic-nexcompat.pk3dir.git|
+|<code>/xonotic</code>|git://git.xonotic.org/xonotic/xonotic.git|
When using the ssh protocol, the xonotic/ directory is skipped, so it's just: git.xonotic.org/xonotic.git
Before creating a branch, you first have to choose a base of your branch. Then you can create your branch:
Let's assume your name is <code>me</code>, your branch will be called <code>feature1</code> and your base will be <code>master</code>.
There are several ways of creating a branch:
-You can simply create it by issuing:
-<pre>git branch me/feature1 master</pre>
+You can simply create it by doing this from the xonotic directory and selecting where to branch:
+<pre>./all branch me/feature1</pre>
This will create the branch locally, nothing else. It will not checkout the branch. You can do this now:
<pre>git checkout me/feature1</pre>
* To commit ALL changed files (without adding new files): <pre>git commit -a</pre> or again: <pre>git commit -am "message"</pre>
In git all your changes are local. This includes your commits! If you want your branch to be updated on the remote repository, you have to push it.
-*Note:* Pushing requires commit rights to the repository. You may ask divVerent or merlijn for these rights, but do not bother them unless you have an ssh key you would can show them.
* Usually, you can push your changes doing: <pre>git push me/feature1</pre>
* If your branch is not a tracking branch: <pre>git push origin me/feature1</pre> or if you have an older git version you may have to do <pre>git push origin me/feature1:refs/heads/me/feature1</pre>