1 |
commit: 8f6095d523d5e36ddff1f089cf612fd5fe74e75a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 14 10:18:42 2017 +0000 |
4 |
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 3 04:29:35 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=8f6095d5 |
7 |
|
8 |
ebuild-maintenance/git: Include instructions for setting up the checkout |
9 |
|
10 |
ebuild-maintenance/git/text.xml | 102 ++++++++++++++++++++++++++++++++++++++-- |
11 |
1 file changed, 99 insertions(+), 3 deletions(-) |
12 |
|
13 |
diff --git a/ebuild-maintenance/git/text.xml b/ebuild-maintenance/git/text.xml |
14 |
index 172e22c..2070217 100644 |
15 |
--- a/ebuild-maintenance/git/text.xml |
16 |
+++ b/ebuild-maintenance/git/text.xml |
17 |
@@ -5,12 +5,108 @@ |
18 |
|
19 |
<body> |
20 |
<p> |
21 |
-This guide covers git usage instructions and policies specific to Gentoo |
22 |
-ebuild development. It assumes that the readers possess basic git |
23 |
-knowledge. For a generic guide, please see the official |
24 |
+This guide covers git usage instructions and policies specific to Gentoo ebuild |
25 |
+development. It assumes that the readers possess basic git knowledge. |
26 |
+For a generic guide, please see the official |
27 |
<uri link="https://git-scm.com/book/">git book</uri>. |
28 |
</p> |
29 |
|
30 |
+ |
31 |
+<section> |
32 |
+<title>Preparing a development checkout</title> |
33 |
+<body> |
34 |
+ |
35 |
+<subsection> |
36 |
+<title>Cloning the gentoo.git repository</title> |
37 |
+<body> |
38 |
+ |
39 |
+<p> |
40 |
+The ebuild development happens on the official git repository. You can push |
41 |
+your changes only through the SSH protocol. Therefore, clone the repository |
42 |
+using: |
43 |
+</p> |
44 |
+ |
45 |
+<pre> |
46 |
+git clone git@××××××××××.org:repo/gentoo.git |
47 |
+</pre> |
48 |
+ |
49 |
+<p> |
50 |
+If you do not have SSH access to the Gentoo git service, you can use the anongit |
51 |
+mirror for read-only access instead: |
52 |
+</p> |
53 |
+ |
54 |
+<pre> |
55 |
+git clone https://anongit.gentoo.org/git/repo/gentoo.git |
56 |
+</pre> |
57 |
+ |
58 |
+<p> |
59 |
+Normally git will fetch the complete history from the start of git repository |
60 |
+(Aug 2015). This can require a significant amount of disk space. If you do not |
61 |
+need the full history, you can use the <c>--depth</c> option to create a shallow |
62 |
+clone, including only a subset containing the the newest commits. For example, |
63 |
+<c>--depth=50</c> will include the 50 newest commits. |
64 |
+</p> |
65 |
+ |
66 |
+<p> |
67 |
+Please note that git version 1.9 or newer is required to push when using |
68 |
+a shallow clone. |
69 |
+</p> |
70 |
+ |
71 |
+</body> |
72 |
+</subsection> |
73 |
+ |
74 |
+<subsection> |
75 |
+<title>Configuration specific to the Gentoo repository</title> |
76 |
+<body> |
77 |
+ |
78 |
+<p> |
79 |
+To ensure that the Gentoo policies are followed, you should set the following |
80 |
+configuration variables: |
81 |
+</p> |
82 |
+ |
83 |
+<pre caption="Configuring git for the Gentoo repository"> |
84 |
+git config --local user.name "${YOUR_FULL_NAME}" |
85 |
+# use your @gentoo.org address even if you have a different default |
86 |
+git config --local user.email "${YOUR_NICKNAME}@gentoo.org" |
87 |
+ |
88 |
+# enable commit and push signing |
89 |
+git config --local user.signingkey "0x${LONG_OPENPGP_KEY_ID}" |
90 |
+git config --local commit.gpgsign 1 |
91 |
+git config --local push.gpgsign 1 |
92 |
+ |
93 |
+# prevent implicit merges on 'git pull' |
94 |
+git config --local pull.ff only |
95 |
+</pre> |
96 |
+ |
97 |
+</body> |
98 |
+</subsection> |
99 |
+ |
100 |
+<subsection> |
101 |
+<title>Grafting converted CVS history into the clone</title> |
102 |
+<body> |
103 |
+ |
104 |
+<p> |
105 |
+To include the converted CVS history in the git repository, you can |
106 |
+graft it into the repository: |
107 |
+</p> |
108 |
+ |
109 |
+<pre caption="Grafting the history into git"> |
110 |
+git remote add history https://anongit.gentoo.org/git/repo/gentoo/historical.git/ |
111 |
+git fetch history |
112 |
+git replace --graft 56bd759df1d0c750a065b8c845e93d5dfa6b549d history/master |
113 |
+</pre> |
114 |
+ |
115 |
+<p> |
116 |
+Once this is done, git commands such as <c>git log</c> will include |
117 |
+the historical commits after the initial git commit. |
118 |
+</p> |
119 |
+ |
120 |
+</body> |
121 |
+</subsection> |
122 |
+ |
123 |
+</body> |
124 |
+</section> |
125 |
+ |
126 |
</body> |
127 |
</chapter> |
128 |
</guide> |