Fix up remaining man pages that use asciidoc "callouts".
Unfortunately docbook does not allow a callout to be referenced from inside a callout list description. Rewrite one paragraph in git-reset man page to work around this limitation. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Sean Estabrooks committed
Apr 28, 2006 at 09:15 UTC
48aeecdcc14684111ddb8ac0ec3bfdc5245ee75e
6 files changed
+104
-108
Documentation/everyday.txt
+22
-23
@@ -61,7 +61,8 @@ $ git prune
61
$ git count-objects <2>
62
$ git repack <3>
63
$ git prune <4>
64
-
64
+------------
65
++
66
<1> running without "--full" is usually cheap and assures the
67
repository health reasonably well.
68
<2> check how many loose objects there are and how much
@@ -69,17 +70,16 @@ diskspace is wasted by not repacking.
70
<3> without "-a" repacks incrementally. repacking every 4-5MB
71
of loose objects accumulation may be a good rule of thumb.
72
<4> after repack, prune removes the duplicate loose objects.
72
-------------
73
74
Repack a small project into single pack.::
75
+
76
------------
77
$ git repack -a -d <1>
78
$ git prune
79
-
79
+------------
80
++
81
<1> pack all the objects reachable from the refs into one pack
82
and remove unneeded other packs
82
-------------
83
84
85
Individual Developer (Standalone)[[Individual Developer (Standalone)]]
@@ -129,10 +129,10 @@ $ git-init-db
129
$ git add . <1>
130
$ git commit -m 'import of frotz source tree.'
131
$ git tag v2.43 <2>
132
-
132
+------------
133
++
134
<1> add everything under the current directory.
135
<2> make a lightweight, unannotated tag.
135
-------------
136
137
Create a topic branch and develop.::
138
+
@@ -153,7 +153,8 @@ $ git checkout master <9>
153
$ git pull . alsa-audio <10>
154
$ git log --since='3 days ago' <11>
155
$ git log v2.43.. curses/ <12>
156
-
156
+------------
157
++
158
<1> create a new topic branch.
159
<2> revert your botched changes in "curses/ux_audio_oss.c".
160
<3> you need to tell git if you added a new file; removal and
@@ -170,7 +171,6 @@ you originally wrote.
171
combined and include --max-count=10 (show 10 commits), --until='2005-12-10'.
172
<12> view only the changes that touch what's in curses/
173
directory, since v2.43 tag.
173
-------------
174
175
176
Individual Developer (Participant)[[Individual Developer (Participant)]]
@@ -208,7 +208,8 @@ $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
208
$ git reset --hard ORIG_HEAD <6>
209
$ git prune <7>
210
$ git fetch --tags <8>
211
-
211
+------------
212
++
213
<1> repeat as needed.
214
<2> extract patches from your branch for e-mail submission.
215
<3> "pull" fetches from "origin" by default and merges into the
@@ -221,7 +222,6 @@ area we are interested in.
222
<7> garbage collect leftover objects from reverted pull.
223
<8> from time to time, obtain official tags from the "origin"
224
and store them under .git/refs/tags/.
224
-------------
225
226
227
Push into another repository.::
@@ -239,7 +239,8 @@ satellite$ git push origin <4>
239
mothership$ cd frotz
240
mothership$ git checkout master
241
mothership$ git pull . satellite <5>
242
-
242
+------------
243
++
244
<1> mothership machine has a frotz repository under your home
245
directory; clone from it to start a repository on the satellite
246
machine.
@@ -252,7 +253,6 @@ to local "origin" branch.
253
mothership machine. You could use this as a back-up method.
254
<5> on mothership machine, merge the work done on the satellite
255
machine into the master branch.
255
-------------
256
257
Branch off of a specific tag.::
258
+
@@ -262,12 +262,12 @@ $ edit/compile/test; git commit -a
262
$ git checkout master
263
$ git format-patch -k -m --stdout v2.6.14..private2.6.14 |
264
git am -3 -k <2>
265
-
265
+------------
266
++
267
<1> create a private branch based on a well known (but somewhat behind)
268
tag.
269
<2> forward port all changes in private2.6.14 branch to master branch
270
without a formal "merging".
270
-------------
271
272
273
Integrator[[Integrator]]
@@ -317,7 +317,8 @@ $ git tag -s -m 'GIT 0.99.9x' v0.99.9x <10>
317
$ git fetch ko && git show-branch master maint 'tags/ko-*' <11>
318
$ git push ko <12>
319
$ git push ko v0.99.9x <13>
320
-
320
+------------
321
++
322
<1> see what I was in the middle of doing, if any.
323
<2> see what topic branches I have and think about how ready
324
they are.
@@ -346,7 +347,6 @@ In the output from "git show-branch", "master" should have
347
everything "ko-master" has.
348
<12> push out the bleeding edge.
349
<13> push the tag out, too.
349
-------------
350
351
352
Repository Administration[[Repository Administration]]
@@ -367,7 +367,6 @@ example of managing a shared central repository.
367
368
Examples
369
~~~~~~~~
370
-
370
Run git-daemon to serve /pub/scm from inetd.::
371
+
372
------------
@@ -388,13 +387,13 @@ cindy:x:1002:1002::/home/cindy:/usr/bin/git-shell
387
david:x:1003:1003::/home/david:/usr/bin/git-shell
388
$ grep git /etc/shells <2>
389
/usr/bin/git-shell
391
-
390
+------------
391
++
392
<1> log-in shell is set to /usr/bin/git-shell, which does not
393
allow anything but "git push" and "git pull". The users should
394
get an ssh access to the machine.
395
<2> in many distributions /etc/shells needs to list what is used
396
as the login shell.
397
-------------
397
398
CVS-style shared repository.::
399
+
@@ -419,7 +418,8 @@ $ cat info/allowed-users <4>
418
refs/heads/master alice\|cindy
419
refs/heads/doc-update bob
420
refs/tags/v[0-9]* david
422
-
421
+------------
422
++
423
<1> place the developers into the same git group.
424
<2> and make the shared repository writable by the group.
425
<3> use update-hook example by Carl from Documentation/howto/
@@ -427,7 +427,6 @@ for branch policy control.
427
<4> alice and cindy can push into master, only bob can push into doc-update.
428
david is the release manager and is the only person who can
429
create and push version tags.
430
-------------
430
431
HTTP server to support dumb protocol transfer.::
432
+
@@ -435,7 +434,7 @@ HTTP server to support dumb protocol transfer.::
434
dev$ git update-server-info <1>
435
dev$ ftp user@isp.example.com <2>
436
ftp> cp -r .git /home/user/myproject.git
438
-
437
+------------
438
++
439
<1> make sure your info/refs and objects/info/packs are up-to-date
440
<2> upload to public HTTP server hosted by your ISP.
441
-------------
Documentation/git-checkout.txt
+9
-9
@@ -66,19 +66,19 @@ the `Makefile` to two revisions back, deletes hello.c by
66
mistake, and gets it back from the index.
67
+
68
------------
69
-$ git checkout master <1>
70
-$ git checkout master~2 Makefile <2>
69
+$ git checkout master <1>
70
+$ git checkout master~2 Makefile <2>
71
$ rm -f hello.c
72
-$ git checkout hello.c <3>
73
-
72
+$ git checkout hello.c <3>
73
+------------
74
++
75
<1> switch branch
76
<2> take out a file out of other commit
76
-<3> or "git checkout -- hello.c", as in the next example.
77
-------------
77
+<3> restore hello.c from HEAD of current branch
78
+
79
-If you have an unfortunate branch that is named `hello.c`, the
80
-last step above would be confused as an instruction to switch to
81
-that branch. You should instead write:
79
+If you have an unfortunate branch that is named `hello.c`, this
80
+step would be confused as an instruction to switch to that branch.
81
+You should instead write:
82
+
83
------------
84
$ git checkout -- hello.c
Documentation/git-diff.txt
+19
-19
@@ -46,40 +46,41 @@ EXAMPLES
46
Various ways to check your working tree::
47
+
48
------------
49
-$ git diff <1>
50
-$ git diff --cached <2>
51
-$ git diff HEAD <3>
52
-
49
+$ git diff <1>
50
+$ git diff --cached <2>
51
+$ git diff HEAD <3>
52
+------------
53
++
54
<1> changes in the working tree since your last git-update-index.
55
<2> changes between the index and your last commit; what you
56
would be committing if you run "git commit" without "-a" option.
57
<3> changes in the working tree since your last commit; what you
58
would be committing if you run "git commit -a"
58
-------------
59
60
Comparing with arbitrary commits::
61
+
62
------------
63
-$ git diff test <1>
64
-$ git diff HEAD -- ./test <2>
65
-$ git diff HEAD^ HEAD <3>
66
-
63
+$ git diff test <1>
64
+$ git diff HEAD -- ./test <2>
65
+$ git diff HEAD^ HEAD <3>
66
+------------
67
++
68
<1> instead of using the tip of the current branch, compare with the
69
tip of "test" branch.
70
<2> instead of comparing with the tip of "test" branch, compare with
71
the tip of the current branch, but limit the comparison to the
72
file "test".
73
<3> compare the version before the last commit and the last commit.
73
-------------
74
75
76
Limiting the diff output::
77
+
78
------------
79
-$ git diff --diff-filter=MRC <1>
80
-$ git diff --name-status -r <2>
81
-$ git diff arch/i386 include/asm-i386 <3>
82
-
79
+$ git diff --diff-filter=MRC <1>
80
+$ git diff --name-status -r <2>
81
+$ git diff arch/i386 include/asm-i386 <3>
82
+------------
83
++
84
<1> show only modification, rename and copy, but not addition
85
nor deletion.
86
<2> show only names and the nature of change, but not actual
@@ -88,18 +89,17 @@ which in turn also disables recursive behaviour, so without -r
89
you would only see the directory name if there is a change in a
90
file in a subdirectory.
91
<3> limit diff output to named subtrees.
91
-------------
92
93
Munging the diff output::
94
+
95
------------
96
-$ git diff --find-copies-harder -B -C <1>
97
-$ git diff -R <2>
98
-
96
+$ git diff --find-copies-harder -B -C <1>
97
+$ git diff -R <2>
98
+------------
99
++
100
<1> spend extra cycles to find renames, copies and complete
101
rewrites (very expensive).
102
<2> output diff in reverse.
102
-------------
103
104
105
Author
Documentation/git-init-db.txt
+4
-4
@@ -60,12 +60,12 @@ Start a new git repository for an existing code base::
60
+
61
----------------
62
$ cd /path/to/my/codebase
63
-$ git-init-db <1>
64
-$ git-add . <2>
65
-
63
+$ git-init-db <1>
64
+$ git-add . <2>
65
+----------------
66
++
67
<1> prepare /path/to/my/codebase/.git directory
68
<2> add all existing file to the index
68
-----------------
69
70
71
Author
Documentation/git-reset.txt
+35
-37
@@ -49,10 +49,11 @@ Undo a commit and redo::
49
+
50
------------
51
$ git commit ...
52
-$ git reset --soft HEAD^ <1>
53
-$ edit <2>
54
-$ git commit -a -c ORIG_HEAD <3>
55
-
52
+$ git reset --soft HEAD^ <1>
53
+$ edit <2>
54
+$ git commit -a -c ORIG_HEAD <3>
55
+------------
56
++
57
<1> This is most often done when you remembered what you
58
just committed is incomplete, or you misspelled your commit
59
message, or both. Leaves working tree as it was before "reset".
@@ -60,43 +61,43 @@ message, or both. Leaves working tree as it was before "reset".
61
<3> "reset" copies the old head to .git/ORIG_HEAD; redo the
62
commit by starting with its log message. If you do not need to
63
edit the message further, you can give -C option instead.
63
-------------
64
65
Undo commits permanently::
66
+
67
------------
68
$ git commit ...
69
-$ git reset --hard HEAD~3 <1>
70
-
69
+$ git reset --hard HEAD~3 <1>
70
+------------
71
++
72
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
73
and you do not want to ever see them again. Do *not* do this if
74
you have already given these commits to somebody else.
74
-------------
75
76
Undo a commit, making it a topic branch::
77
+
78
------------
79
-$ git branch topic/wip <1>
80
-$ git reset --hard HEAD~3 <2>
81
-$ git checkout topic/wip <3>
82
-
79
+$ git branch topic/wip <1>
80
+$ git reset --hard HEAD~3 <2>
81
+$ git checkout topic/wip <3>
82
+------------
83
++
84
<1> You have made some commits, but realize they were premature
85
to be in the "master" branch. You want to continue polishing
86
them in a topic branch, so create "topic/wip" branch off of the
87
current HEAD.
88
<2> Rewind the master branch to get rid of those three commits.
89
<3> Switch to "topic/wip" branch and keep working.
89
-------------
90
91
Undo update-index::
92
+
93
------------
94
-$ edit <1>
94
+$ edit <1>
95
$ git-update-index frotz.c filfre.c
96
-$ mailx <2>
97
-$ git reset <3>
98
-$ git pull git://info.example.com/ nitfol <4>
99
-
96
+$ mailx <2>
97
+$ git reset <3>
98
+$ git pull git://info.example.com/ nitfol <4>
99
+------------
100
++
101
<1> you are happily working on something, and find the changes
102
in these files are in good order. You do not want to see them
103
when you run "git diff", because you plan to work on other files
@@ -109,12 +110,11 @@ index changes for these two files. Your changes in working tree
110
remain there.
111
<4> then you can pull and merge, leaving frotz.c and filfre.c
112
changes still in the working tree.
112
-------------
113
114
Undo a merge or pull::
115
+
116
------------
117
-$ git pull <1>
117
+$ git pull <1>
118
Trying really trivial in-index merge...
119
fatal: Merge requires file-level merging
120
Nope.
@@ -122,20 +122,19 @@ Nope.
122
Auto-merging nitfol
123
CONFLICT (content): Merge conflict in nitfol
124
Automatic merge failed/prevented; fix up by hand
125
-$ git reset --hard <2>
126
-
125
+$ git reset --hard <2>
126
+$ git pull . topic/branch <3>
127
+Updating from 41223... to 13134...
128
+Fast forward
129
+$ git reset --hard ORIG_HEAD <4>
130
+------------
131
++
132
<1> try to update from the upstream resulted in a lot of
133
conflicts; you were not ready to spend a lot of time merging
134
right now, so you decide to do that later.
135
<2> "pull" has not made merge commit, so "git reset --hard"
136
which is a synonym for "git reset --hard HEAD" clears the mess
137
from the index file and the working tree.
133
-
134
-$ git pull . topic/branch <3>
135
-Updating from 41223... to 13134...
136
-Fast forward
137
-$ git reset --hard ORIG_HEAD <4>
138
-
138
<3> merge a topic branch into the current branch, which resulted
139
in a fast forward.
140
<4> but you decided that the topic branch is not ready for public
@@ -143,7 +142,6 @@ consumption yet. "pull" or "merge" always leaves the original
142
tip of the current branch in ORIG_HEAD, so resetting hard to it
143
brings your index file and the working tree back to that state,
144
and resets the tip of the branch to that commit.
146
-------------
145
146
Interrupted workflow::
147
+
@@ -155,21 +153,21 @@ need to get to the other branch for a quick bugfix.
153
------------
154
$ git checkout feature ;# you were working in "feature" branch and
155
$ work work work ;# got interrupted
158
-$ git commit -a -m 'snapshot WIP' <1>
156
+$ git commit -a -m 'snapshot WIP' <1>
157
$ git checkout master
158
$ fix fix fix
159
$ git commit ;# commit with real log
160
$ git checkout feature
163
-$ git reset --soft HEAD^ ;# go back to WIP state <2>
164
-$ git reset <3>
165
-
161
+$ git reset --soft HEAD^ ;# go back to WIP state <2>
162
+$ git reset <3>
163
+------------
164
++
165
<1> This commit will get blown away so a throw-away log message is OK.
166
<2> This removes the 'WIP' commit from the commit history, and sets
167
your working tree to the state just before you made that snapshot.
169
-<3> After <2>, the index file still has all the WIP changes you
170
- committed in <1>. This sets it to the last commit you were
171
- basing the WIP changes on.
172
-------------
168
+<3> At this point the index file still has all the WIP changes you
169
+ committed as 'snapshot WIP'. This updates the index to show your
170
+ WIP files as uncommitted.
171
172
Author
173
------
Documentation/git-update-index.txt
+15
-16
@@ -247,34 +247,33 @@ To update and refresh only the files already checked out:
247
$ git-checkout-index -n -f -a && git-update-index --ignore-missing --refresh
248
----------------
249
250
-On an inefficient filesystem with `core.ignorestat` set:
251
-
250
+On an inefficient filesystem with `core.ignorestat` set::
251
++
252
------------
253
-$ git update-index --really-refresh <1>
254
-$ git update-index --no-assume-unchanged foo.c <2>
255
-$ git diff --name-only <3>
253
+$ git update-index --really-refresh <1>
254
+$ git update-index --no-assume-unchanged foo.c <2>
255
+$ git diff --name-only <3>
256
$ edit foo.c
257
-$ git diff --name-only <4>
257
+$ git diff --name-only <4>
258
M foo.c
259
-$ git update-index foo.c <5>
260
-$ git diff --name-only <6>
259
+$ git update-index foo.c <5>
260
+$ git diff --name-only <6>
261
$ edit foo.c
262
-$ git diff --name-only <7>
263
-$ git update-index --no-assume-unchanged foo.c <8>
264
-$ git diff --name-only <9>
262
+$ git diff --name-only <7>
263
+$ git update-index --no-assume-unchanged foo.c <8>
264
+$ git diff --name-only <9>
265
M foo.c
266
-
267
-<1> forces lstat(2) to set "assume unchanged" bits for paths
268
- that match index.
266
+------------
267
++
268
+<1> forces lstat(2) to set "assume unchanged" bits for paths that match index.
269
<2> mark the path to be edited.
270
<3> this does lstat(2) and finds index matches the path.
271
-<4> this does lstat(2) and finds index does not match the path.
271
+<4> this does lstat(2) and finds index does *not* match the path.
272
<5> registering the new version to index sets "assume unchanged" bit.
273
<6> and it is assumed unchanged.
274
<7> even after you edit it.
275
<8> you can tell about the change after the fact.
276
<9> now it checks with lstat(2) and finds it has been changed.
277
-------------
277
278
279
Configuration