@@ -359,7 +359,6 @@ $ cd my2.6
$ git branch my2.6.14 v2.6.14 <1>
$ git switch my2.6.14
------------
-+
<1> This step and the next one could be combined into a single step with
"checkout -b my2.6.14 v2.6.14".
@@ -371,7 +370,6 @@ $ cd my.git
$ git branch -d -r origin/todo origin/html origin/man <1>
$ git branch -D test <2>
------------
-+
<1> Delete the remote-tracking branches "todo", "html" and "man". The next
'fetch' or 'pull' will create them again unless you configure them not to.
See linkgit:git-fetch[1].
@@ -384,7 +382,6 @@ Listing branches from a specific remote::
$ git branch -r -l '<remote>/<pattern>' <1>
$ git for-each-ref 'refs/remotes/<remote>/<pattern>' <2>
------------
-+
<1> Using `-a` would conflate <remote> with any local branches you happen to
have been prefixed with the same <remote> pattern.
<2> `for-each-ref` can take a wide range of options. See linkgit:git-for-each-ref[1]
@@ -153,7 +153,6 @@ $ git diff <1>
$ git diff --cached <2>
$ git diff HEAD <3>
------------
-+
<1> Changes in the working tree not yet staged for the next commit.
<2> Changes between the index and your last commit; what you
would be committing if you run `git commit` without `-a` option.
@@ -167,7 +166,6 @@ $ git diff test <1>
$ git diff HEAD -- ./test <2>
$ git diff HEAD^ HEAD <3>
------------
-+
<1> Instead of using the tip of the current branch, compare with the
tip of "test" branch.
<2> Instead of comparing with the tip of "test" branch, compare with
@@ -182,7 +180,6 @@ $ git diff topic master <1>
$ git diff topic..master <2>
$ git diff topic...master <3>
------------
-+
<1> Changes between the tips of the topic and the master branches.
<2> Same as above.
<3> Changes that occurred on the master branch since when the topic
@@ -195,7 +192,6 @@ $ git diff --diff-filter=MRC <1>
$ git diff --name-status <2>
$ git diff arch/i386 include/asm-i386 <3>
------------
-+
<1> Show only modification, rename, and copy, but not addition
or deletion.
<2> Show only names and the nature of change, but not actual
@@ -208,7 +204,6 @@ Munging the diff output::
$ git diff --find-copies-harder -B -C <1>
$ git diff -R <2>
------------
-+
<1> Spend extra cycles to find renames, copies and complete
rewrites (very expensive).
<2> Output diff in reverse.
@@ -164,7 +164,6 @@ $ git init <1>
$ git add . <2>
$ git commit <3>
----------------
-+
<1> Create a /path/to/my/codebase/.git directory.
<2> Add all existing files to the index.
<3> Record the pristine state as the first commit in the history.
@@ -145,7 +145,6 @@ $ mailx <2>
$ git reset <3>
$ git pull git://info.example.com/ nitfol <4>
------------
-+
<1> You are happily working on something, and find the changes
in these files are in good order. You do not want to see them
when you run `git diff`, because you plan to work on other files
@@ -167,7 +166,6 @@ $ git reset --soft HEAD^ <1>
$ edit <2>
$ git commit -a -c ORIG_HEAD <3>
------------
-+
<1> This is most often done when you remembered what you
just committed is incomplete, or you misspelled your commit
message, or both. Leaves working tree as it was before "reset".
@@ -185,7 +183,6 @@ $ git branch topic/wip <1>
$ git reset --hard HEAD~3 <2>
$ git switch topic/wip <3>
------------
-+
<1> You have made some commits, but realize they were premature
to be in the `master` branch. You want to continue polishing
them in a topic branch, so create `topic/wip` branch off of the
@@ -199,7 +196,6 @@ Undo commits permanently::
$ git commit ...
$ git reset --hard HEAD~3 <1>
------------
-+
<1> The last three commits (`HEAD`, `HEAD^`, and `HEAD~2`) were bad
and you do not want to ever see them again. Do *not* do this if
you have already given these commits to somebody else. (See the
@@ -219,7 +215,6 @@ Updating from 41223... to 13134...
Fast-forward
$ git reset --hard ORIG_HEAD <4>
------------
-+
<1> Try to update from the upstream resulted in a lot of
conflicts; you were not ready to spend a lot of time merging
right now, so you decide to do that later.
@@ -244,7 +239,6 @@ Merge made by recursive.
...
$ git reset --merge ORIG_HEAD <2>
------------
-+
<1> Even if you may have local modifications in your
working tree, you can safely say `git pull` when you know
that the change in the other branch does not overlap with
@@ -274,7 +268,6 @@ $ git switch feature
$ git reset --soft HEAD^ ;# go back to WIP state <2>
$ git reset <3>
------------
-+
<1> This commit will get blown away so a throw-away log message is OK.
<2> This removes the 'WIP' commit from the commit history, and sets
your working tree to the state just before you made that snapshot.
@@ -295,7 +288,6 @@ $ git reset -- frotz.c <1>
$ git commit -m "Commit files in index" <2>
$ git add frotz.c <3>
------------
-+
<1> This removes the file from the index while keeping it in the working
directory.
<2> This commits all other changes in the index.
@@ -318,7 +310,6 @@ $ edit
$ git switch -c branch2 <2>
$ git reset --keep start <3>
------------
-+
<1> This commits your first edits in `branch1`.
<2> In the ideal world, you could have realized that the earlier
commit did not belong to the new topic when you created and switched
@@ -346,7 +337,6 @@ $ git add ... <6>
$ git diff --cached <7>
$ git commit ... <8>
------------
-+
<1> First, reset the history back one commit so that we remove the original
commit, but leave the working tree with all the changes. The -N ensures
that any new files added with `HEAD` are still marked so that `git add -p`
@@ -159,7 +159,6 @@ $ git restore --source master~2 Makefile <1>
$ rm -f hello.c
$ git restore hello.c <2>
------------
-
<1> take a file out of another commit
<2> restore hello.c from the index
@@ -381,7 +381,6 @@ $ git update-index --no-assume-unchanged foo.c <8>
$ git diff --name-only <9>
M foo.c
------------
-+
<1> forces lstat(2) to set "assume unchanged" bits for paths that match index.
<2> mark the path to be edited.
<3> this does lstat(2) and finds index matches the path.
@@ -72,7 +72,6 @@ $ git add . <1>
$ git commit -m "import of frotz source tree."
$ git tag v2.43 <2>
------------
-+
<1> add everything under the current directory.
<2> make a lightweight, unannotated tag.
@@ -94,7 +93,6 @@ $ git merge alsa-audio <9>
$ git log --since='3 days ago' <10>
$ git log v2.43.. curses/ <11>
------------
-+
<1> create a new topic branch.
<2> revert your botched changes in `curses/ux_audio_oss.c`.
<3> you need to tell Git if you added a new file; removal and
@@ -159,7 +157,6 @@ $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <9>
$ git reset --hard ORIG_HEAD <10>
$ git gc <11>
------------
-+
<1> checkout a new branch `mine` from master.
<2> repeat as needed.
<3> extract patches from your branch, relative to master,
@@ -196,7 +193,6 @@ mothership$ cd frotz
mothership$ git switch master
mothership$ git merge satellite/master <5>
------------
-+
<1> mothership machine has a frotz repository under your home
directory; clone from it to start a repository on the satellite
machine.
@@ -220,7 +216,6 @@ $ edit/compile/test; git commit -a
$ git checkout master
$ git cherry-pick v2.6.14..private2.6.14 <2>
------------
-+
<1> create a private branch based on a well known (but somewhat behind)
tag.
<2> forward port all changes in `private2.6.14` branch to `master` branch
@@ -290,7 +285,6 @@ $ git fetch ko && for branch in master maint next seen <11>
done
$ git push --follow-tags ko <13>
------------
-+
<1> see what you were in the middle of doing, if anything.
<2> see which branches haven't been merged into `master` yet.
Likewise for any other integration branches e.g. `maint`, `next`
@@ -410,7 +404,6 @@ david:x:1003:1003::/home/david:/usr/bin/git-shell
$ grep git /etc/shells <2>
/usr/bin/git-shell
------------
-+
<1> log-in shell is set to /usr/bin/git-shell, which does not
allow anything but `git push` and `git pull`. The users require
ssh access to the machine.
@@ -441,7 +434,6 @@ refs/heads/master alice\|cindy
refs/heads/doc-update bob
refs/tags/v[0-9]* david
------------
-+
<1> place the developers into the same git group.
<2> and make the shared repository writable by the group.
<3> use update-hook example by Carl from Documentation/howto/
It was initially needed when the callouts were inside the listing, but after 48aeecdcc1 (Fix up remaining man pages that use asciidoc "callouts"., 2006-04-28) moved them outside they are not needed. Some are already following this format, for example git-checkout.txt, git-cherry-pick.txt, and howto/using-merge-subtree.txt. Let's be consistent and do the same everywhere. No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- Documentation/git-branch.txt | 3 --- Documentation/git-diff.txt | 5 ----- Documentation/git-init.txt | 1 - Documentation/git-reset.txt | 10 ---------- Documentation/git-restore.txt | 1 - Documentation/git-update-index.txt | 1 - Documentation/giteveryday.txt | 8 -------- 7 files changed, 29 deletions(-)