Try to be consistent with capitalization in the documentation
Signed-off-by: Steve Hoelzer <shoelzer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6d4bbebd35
commit
434e6ef89d
@ -134,8 +134,8 @@ $ git branch -d -r origin/todo origin/html origin/man <1>
|
||||
$ git branch -D test <2>
|
||||
------------
|
||||
+
|
||||
<1> delete remote-tracking branches "todo", "html", "man"
|
||||
<2> delete "test" branch even if the "master" branch does not have all
|
||||
<1> Delete remote-tracking branches "todo", "html", "man"
|
||||
<2> Delete "test" branch even if the "master" branch does not have all
|
||||
commits from test branch.
|
||||
|
||||
|
||||
|
@ -76,10 +76,10 @@ $ 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
|
||||
<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.
|
||||
<3> changes in the working tree since your last commit; what you
|
||||
<3> Changes in the working tree since your last commit; what you
|
||||
would be committing if you run "git commit -a"
|
||||
|
||||
Comparing with arbitrary commits::
|
||||
@ -90,12 +90,12 @@ $ git diff HEAD -- ./test <2>
|
||||
$ git diff HEAD^ HEAD <3>
|
||||
------------
|
||||
+
|
||||
<1> instead of using the tip of the current branch, compare with the
|
||||
<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
|
||||
<2> Instead of comparing with the tip of "test" branch, compare with
|
||||
the tip of the current branch, but limit the comparison to the
|
||||
file "test".
|
||||
<3> compare the version before the last commit and the last commit.
|
||||
<3> Compare the version before the last commit and the last commit.
|
||||
|
||||
|
||||
Limiting the diff output::
|
||||
@ -106,11 +106,11 @@ $ git diff --name-status <2>
|
||||
$ git diff arch/i386 include/asm-i386 <3>
|
||||
------------
|
||||
+
|
||||
<1> show only modification, rename and copy, but not addition
|
||||
<1> Show only modification, rename and copy, but not addition
|
||||
nor deletion.
|
||||
<2> show only names and the nature of change, but not actual
|
||||
<2> Show only names and the nature of change, but not actual
|
||||
diff output.
|
||||
<3> limit diff output to named subtrees.
|
||||
<3> Limit diff output to named subtrees.
|
||||
|
||||
Munging the diff output::
|
||||
+
|
||||
@ -119,9 +119,9 @@ $ git diff --find-copies-harder -B -C <1>
|
||||
$ git diff -R <2>
|
||||
------------
|
||||
+
|
||||
<1> spend extra cycles to find renames, copies and complete
|
||||
<1> Spend extra cycles to find renames, copies and complete
|
||||
rewrites (very expensive).
|
||||
<2> output diff in reverse.
|
||||
<2> Output diff in reverse.
|
||||
|
||||
|
||||
Author
|
||||
|
@ -107,11 +107,11 @@ pull after you are done and ready.
|
||||
|
||||
When things cleanly merge, these things happen:
|
||||
|
||||
1. the results are updated both in the index file and in your
|
||||
working tree,
|
||||
2. index file is written out as a tree,
|
||||
3. the tree gets committed, and
|
||||
4. the `HEAD` pointer gets advanced.
|
||||
1. The results are updated both in the index file and in your
|
||||
working tree;
|
||||
2. Index file is written out as a tree;
|
||||
3. The tree gets committed; and
|
||||
4. The `HEAD` pointer gets advanced.
|
||||
|
||||
Because of 2., we require that the original state of the index
|
||||
file to match exactly the current `HEAD` commit; otherwise we
|
||||
|
@ -63,7 +63,7 @@ $ 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".
|
||||
<2> make corrections to working tree files.
|
||||
<2> Make corrections to working tree files.
|
||||
<3> "reset" copies the old head to .git/ORIG_HEAD; redo the
|
||||
commit by starting with its log message. If you do not need to
|
||||
edit the message further, you can give -C option instead.
|
||||
@ -106,17 +106,17 @@ $ git reset <3>
|
||||
$ git pull git://info.example.com/ nitfol <4>
|
||||
------------
|
||||
+
|
||||
<1> you are happily working on something, and find the changes
|
||||
<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
|
||||
and changes with these files are distracting.
|
||||
<2> somebody asks you to pull, and the changes sounds worthy of merging.
|
||||
<3> however, you already dirtied the index (i.e. your index does
|
||||
<2> Somebody asks you to pull, and the changes sounds worthy of merging.
|
||||
<3> However, you already dirtied the index (i.e. your index does
|
||||
not match the HEAD commit). But you know the pull you are going
|
||||
to make does not affect frotz.c nor filfre.c, so you revert the
|
||||
index changes for these two files. Your changes in working tree
|
||||
remain there.
|
||||
<4> then you can pull and merge, leaving frotz.c and filfre.c
|
||||
<4> Then you can pull and merge, leaving frotz.c and filfre.c
|
||||
changes still in the working tree.
|
||||
|
||||
Undo a merge or pull::
|
||||
@ -133,15 +133,15 @@ Fast forward
|
||||
$ git reset --hard ORIG_HEAD <4>
|
||||
------------
|
||||
+
|
||||
<1> try to update from the upstream resulted in a lot of
|
||||
<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.
|
||||
<2> "pull" has not made merge commit, so "git reset --hard"
|
||||
which is a synonym for "git reset --hard HEAD" clears the mess
|
||||
from the index file and the working tree.
|
||||
<3> merge a topic branch into the current branch, which resulted
|
||||
<3> Merge a topic branch into the current branch, which resulted
|
||||
in a fast forward.
|
||||
<4> but you decided that the topic branch is not ready for public
|
||||
<4> But you decided that the topic branch is not ready for public
|
||||
consumption yet. "pull" or "merge" always leaves the original
|
||||
tip of the current branch in ORIG_HEAD, so resetting hard to it
|
||||
brings your index file and the working tree back to that state,
|
||||
|
Loading…
Reference in New Issue
Block a user