]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Repository_Access.textile
adding http clone url
[xonotic/xonotic.wiki.git] / Repository_Access.textile
1 h1. Repository Access
2
3 The repository is accessed using git.
4
5 h2. Linux/OS X:
6
7 First, you install git using your favorite package manager. Then:
8
9 <pre>
10 git clone git://git.xonotic.org/xonotic/xonotic.git
11 cd xonotic
12 ./all update
13 </pre>
14
15 The git:// protocol uses port 9418, which may be a problem if you're behind a strict firewall. You may instead use the clone url http://git.xonotic.org/xonotic/xonotic.git however using the git protocol directly is preferred for performance reasons.
16
17 After that, you have a working checkout of the repository.
18
19 h3. Getting write access
20
21 A condition for write (push) access is that you agree that any code or data you push will be licensed under the General Public License, version 2, with or without the "or any later version" clause. In case the directory the changes apply to contains a LICENSE or COPYING file indicating another license, your pushed code has to be dual licensed appropriately. Subdirectories currently having a dual license:
22 * data/qcsrc/warpzonelib - dual licensed as "GPLv2 or later" or MIT license.
23
24 In case code you pushed was not written by you, it is your responsibility to ensure proper licensing.
25
26 To apply for write access, make an issue of type "Support" in the category "Repository" and attach your public SSH key to it.
27
28 To cleanly check out then, you would do:
29
30 <pre>
31 git clone ssh://xonotic@git.xonotic.org/xonotic.git
32 cd xonotic
33 ./all update
34 </pre>
35
36 If you already have a checkout, you would do:
37
38 <pre>
39 git config remote.origin.url ssh://xonotic@git.xonotic.org/xonotic.git
40 ./all update
41 </pre>
42
43 After that, you can write to the reposiotry using the usual git commands (commit, push).
44
45 h3. Working with the helper script "all"
46
47 To make working with the repo a little easier there's a little helper script (it's called all, as mentioned in above clone commands). It supports the following commands:
48
49 <pre>
50 ./all update
51 </pre>
52
53 This command updates all the xonotic repositories.
54
55 <pre>
56 ./all branch
57 </pre>
58
59 Lists the branches you are currrently on, in the respective repositories
60
61 <pre>
62 ./all branches
63 </pre>
64
65 Lists all the branches known for all the respective repositories
66
67 <pre>
68 ./all compile
69 </pre>
70
71 Compiles the game given that you have the required libs installed
72
73 <pre>
74 ./all checkout
75 </pre>
76
77 Who knows?
78
79 <pre>
80 ./all run xonotic
81 </pre>
82
83 Starts the xonotic client
84
85 <pre>
86 ./all run dedicated xonotic
87 </pre>
88
89 Starts a xonotic dedicated server
90
91 h3. Further git information
92
93 About tracking remote branches:
94
95 http://www.gitready.com/beginner/2009/03/09/remote-tracking-branches.html
96
97 This wiki's [[Git]] page.
98
99 A tutorial for SVN users:
100
101 http://git-scm.org/course/svn.html
102
103 h2. Windows
104
105 Info for TortoiseGit / msysgit:
106
107 To get a GIT clone using mysysgit and Tortoise GIT, do the following:
108
109 - Go to the folder where you intend to clone, right click and choose Git Clone from the context menu. Clone the repository from git://git.xonotic.org/xonotic/xonotic.git and wait for everything to download.
110
111 - Once the first step is ready, open a command prompt or git bash and browse to the root folder of your clone. Write "./all update" as described above to get the separate data repos. After that you have a working GIT clone.
112
113 To write your own changes to the Xonotic git, do the following:
114
115 - You must first have a putty SSH key, containing your private key. To generate one use "puttygen":http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html which creates a ppk file. Choose SSH-2 RSA format and once the key has been generated save it as a private key.
116
117 - Make sure the public key is accepted on the GIT server (see getting access above). To find it, open the generated key in a text editor and read the "public-lines".
118
119 - Open the Settings menu of Tortoise GIT (right click anywhere in the folder you are setting this for) and go to Git -> Remote. Select "origin" for remote, "ssh://xonotic@git.xonotic.org/xonotic-data.pk3dir.git" for URL (data.pk3dir is the example for the "data" branch, each pk3dir is separate!) and for Putty Key browse and select the key file previously mentioned.
120
121 - In order to make a new branch, right click somewhere and choose Create Branch from the Tortoise GIT context menu. This will create a local branch you can do anything with. Once you locally committed your changes to your branch, select Push to upload or update the branch on the GIT server. From the Push window, choose your local branch for Local, leave Remote empty, and select origin for Destination.
122
123 NOTE 1: Before creating your local branch and committing to it, make sure you've configured your user settings from Settings -> Git - > Config (such as your name which will display in the logs).
124
125 NOTE 2: Try naming your branch myname/mychange for each patch. For instance, if your name is Alex and the change you are committing is a menu fix, use something like alex/menufix.