]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blobdiff - Git.markdown
revise markup for gitlab
[xonotic/xonotic.wiki.git] / Git.markdown
index 8cbd19d97e50f787de90cd31744aafe38eee04af..9b607d2fac2d7037486c0274eda362e87c6bfaf4 100644 (file)
@@ -7,12 +7,12 @@ 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.
-Please check [Repository Access][] to make sure you checked out **all** of the repositories. <code>data/</code> for example resides in its own repository.
+Please check [Repository Access](Repository_Access) to make sure you checked out **all** of the repositories. <code>data/</code> for example resides in its own repository.
 
 Project structure
 -----------------
 
-The game content can be divided into several distinct parts, like the <code>data/</code> directory, and some of its subdirectories. This is why there are several repositories, and a helper script to fetch and update them all. This is described in [Repository Access][] under “Working with the helper script ./all”
+The game content can be divided into several distinct parts, like the <code>data/</code> directory, and some of its subdirectories. This is why there are several repositories, and a helper script to fetch and update them all. This is described in [Repository Access](Repository_Access) under "Working with the helper script ./all"
 
 The current structure looks as follows:
 |*.Directory|*.Repository|
@@ -28,7 +28,7 @@ The current structure looks as follows:
 |<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 its just: git.xonotic.org/xonotic.git
+When using the ssh protocol, the xonotic/ directory is skipped, so it's just: git.xonotic.org/xonotic.git
 
 You can still use the <code>data/</code> directory as base for the game since darkplaces now supports <code>.pk3dir</code> directories natively.
 
@@ -37,7 +37,7 @@ Creating a new branch
 
 By convention, branches are usually called <yourname>/<branch>.
 Before creating a branch, you first have to choose a base of your branch. Then you can create your branch:
-Lets assume your name is <code>me</code>, your branch will be called <code>feature1</code> and your base will be <code>master</code>.
+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 doing this from the xonotic directory and selecting where to branch:
 
@@ -50,7 +50,7 @@ This will create the branch locally and nothing else. It will not checkout the b
 Another possibility would be to checkout your base, and then use <code>git checkout ~~b me/feature1</code>. This is usually nice if you already are on your base branch because it is a single command.
 In case you want to make it available publicly, the most efficient way would be to first push the base branch as your branch on the remote:
 \<pre\>git push origin master:refs/heads/me/feature1
-git branch track me/feature1 origin/me/feature1
+git branch -track me/feature1 origin/me/feature1
 git checkout me/feature1\</pre\>
 The reason for this are tracking branches.
 h4. Tracking branches
@@ -59,19 +59,19 @@ You can either do this manually by getting diffs and logs from <code>origin/me/f
 \<pre\>git log origin/me/feature1..me/feature1
 git diff origin/me/feature1..me/feature1\</pre\>
 Or you make sure you have tracking branches.
-This can be done by using <code>git branch —track …</code> to create the branch.
+This can be done by using <code>git branch -track ...</code> to create the branch.
 h4. Making a non-tracking branch a tracking branch
-Most of gits magic is done in the config file. A tracking branch simple has merge information in the config. If your branch is not a tracking one and you wish to make it one, you can either push it, then remove the local version, and use <code>git branch track me/feature1 origin/me/feature1</code> to recreate it as a tracking one, or you add the necessary config lines:
+Most of gits magic is done in the config file. A tracking branch simple has merge information in the config. If your branch is not a tracking one and you wish to make it one, you can either push it, then remove the local version, and use <code>git branch -track me/feature1 origin/me/feature1</code> to recreate it as a tracking one, or you add the necessary config lines:
 \<pre\>git config branch.me/feature1.remote origin
 git config branch.me/feature1.merge refs/heads/me/feature1\</pre\>
 h2. Committing changes
 After editing the code, you need to commit your changes. Since in git all your changes are local and you usually push to the repository after you added a set of changes, it is usually a good idea to make small commits with a good commit-message, instead of committing huge chunks of changes.
 Some useful commands:
 \* To add new files to the index to be committed on git commit: \<pre\>git add file1 \</pre\>
-\* To commit the files which have been added using <code>git add</code>: \<pre\>git commit\</pre\> or \<pre\>git commit~~m “message”
+\* To commit the files which have been added using <code>git add</code>: \<pre\>git commit\</pre\> or \<pre\>git commit~~m "message"
 
 </pre>
--   To commit ALL changed files (without adding new files): \<pre\>git commit ~~a\</pre\> or again: \<pre\>git commit~~am “message”\</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.
 
@@ -92,7 +92,7 @@ Merging and rebasing
 
 In git you have two ways of combining two branches: You can either merge them, which does exactly what its name suggests: it merges the commits together. Or you can rebase the branch.
 
-Rebasing means that all your changes will be put at the end. This works by first collecting and removing all your changes, then replacing your branch with the base branch, then applying all your changes to it. Whenever something fails to apply you’ll be asked to fix it, and then issue a <code>git rebase —continue</code>
+Rebasing means that all your changes will be put at the end. This works by first collecting and removing all your changes, then replacing your branch with the base branch, then applying all your changes to it. Whenever something fails to apply you'll be asked to fix it, and then issue a <code>git rebase -continue</code>
 
 -   Merging master into me/feature1: \<pre\>git checkout me/feature1
     git merge master\</pre\>
@@ -101,7 +101,7 @@ Rebasing means that all your changes will be put at the end. This works by first
 -   Rebasing my branch - you should only do this when the branch is not pushed to a remote repository regularly: \<pre\>git checkout me/feature1
     git rebase master
     in case of conflicts, edit the conflicting files, then do:
-    git add conflicting\_file1 [conflicting\_file2]
-    git rebase continue\</pre\>
+    git add conflicting\_file1 [conflicting\_file2...]
+    git rebase -continue\</pre\>
 
-TODO
+TODO...