With git-commands moving out of $(bindir), it is useful to make a
clearer distinction between the git subcommand 'git-whatever' and
the command you type, `git whatever <options>`. So we use a dash
after "git" when referring to the former and not the latter.
I already sent a patch doing this same thing, but I missed some
spots.
Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Jonathan Nieder17 years agocommitted byJunio C Hamano
@ -163,7 +163,7 @@ to other tags will be rewritten to point to the underlying commit.
@@ -163,7 +163,7 @@ to other tags will be rewritten to point to the underlying commit.
-f::
--force::
`git filter-branch` refuses to start with an existing temporary
`git-filter-branch` refuses to start with an existing temporary
directory or when there are already refs starting with
@ -163,7 +163,7 @@ If this three-way merge resolves cleanly, the result is written
@@ -163,7 +163,7 @@ If this three-way merge resolves cleanly, the result is written
out to your working tree file, so you would not have to manually
resolve it. Note that `git-rerere` leaves the index file alone,
so you still need to do the final sanity checks with `git diff`
(or `git diff -c`) and `git add` when you are satisfied.
(or `git diff -c`) and `git-add` when you are satisfied.
As a convenience measure, `git-merge` automatically invokes
`git-rerere` when it exits with a failed automerge, which
@ -595,7 +595,7 @@ pointer to the state you want to tag, but also a small tag name and
@@ -595,7 +595,7 @@ pointer to the state you want to tag, but also a small tag name and
message, along with optionally a PGP signature that says that yes,
you really did
that tag. You create these annotated tags with either the `-a` or
`-s` flag to `git tag`:
`-s` flag to `git-tag`:
----------------
$ git tag -s <tagname>
@ -642,7 +642,7 @@ and it will be gone. There's no external repository, and there's no
@@ -642,7 +642,7 @@ and it will be gone. There's no external repository, and there's no
history outside the project you created.
- if you want to move or duplicate a git repository, you can do so. There
is `git clone` command, but if all you want to do is just to
is `git-clone` command, but if all you want to do is just to
create a copy of your repository (with all the full history that
went along with it), you can do so with a regular
`cp -a git-tutorial new-git-tutorial`.
@ -776,7 +776,7 @@ to it.
@@ -776,7 +776,7 @@ to it.
================================================
If you make the decision to start your new branch at some
other point in the history than the current `HEAD`, you can do so by
just telling `git checkout` what the base of the checkout would be.
just telling `git-checkout` what the base of the checkout would be.
In other words, if you have an earlier tag or branch, you'd just do
@ -1963,10 +1963,10 @@ error: failed to push to 'ssh://yourserver.com/~you/proj.git'
@@ -1963,10 +1963,10 @@ error: failed to push to 'ssh://yourserver.com/~you/proj.git'
This can happen, for example, if you:
- use `git reset --hard` to remove already-published commits, or
- use `git commit --amend` to replace already-published commits
- use `git-reset --hard` to remove already-published commits, or
- use `git-commit --amend` to replace already-published commits
(as in <<fixing-a-mistake-by-rewriting-history>>), or
- use `git rebase` to rebase any already-published commits (as
- use `git-rebase` to rebase any already-published commits (as
in <<using-git-rebase>>).
You may force git-push to perform the update anyway by preceding the
@ -2170,7 +2170,7 @@ they are for, or what status they are in. To get a reminder of what
@@ -2170,7 +2170,7 @@ they are for, or what status they are in. To get a reminder of what
changes are in a specific branch, use:
-------------------------------------------------
$ git log linux..branchname | git-shortlog
$ git log linux..branchname | git shortlog
-------------------------------------------------
To see whether it has already been merged into the test or release branches,
@ -2443,7 +2443,7 @@ patches to the new mywork. The result will look like:
@@ -2443,7 +2443,7 @@ patches to the new mywork. The result will look like:
................................................
In the process, it may discover conflicts. In that case it will stop
and allow you to fix the conflicts; after fixing conflicts, use "git add"
and allow you to fix the conflicts; after fixing conflicts, use "git-add"
to update the index with those contents, and then, instead of
running git-commit, just run
@ -2700,7 +2700,7 @@ master branch. In more detail:
@@ -2700,7 +2700,7 @@ master branch. In more detail:
git fetch and fast-forwards
---------------------------
In the previous example, when updating an existing branch, "git fetch"
In the previous example, when updating an existing branch, "git-fetch"
checks to make sure that the most recent commit on the remote
branch is a descendant of the most recent commit on your copy of the
branch before updating your copy of the branch to point at the new
@ -2726,7 +2726,7 @@ resulting in a situation like:
@@ -2726,7 +2726,7 @@ resulting in a situation like:
o--o--o <-- new head of the branch
................................................
In this case, "git fetch" will fail, and print out a warning.
In this case, "git-fetch" will fail, and print out a warning.
In that case, you can still force git to update to the new head, as
described in the following section. However, note that in the
to remove any of the "loose" objects that are now contained in the
pack. This will also remove any unreferenced objects (which may be
created when, for example, you use "git reset" to remove a commit).
created when, for example, you use "git-reset" to remove a commit).
You can verify that the loose objects are gone by looking at the
.git/objects directory or by running
@ -3135,7 +3135,7 @@ branch still exists, as does everything it pointed to. The branch
@@ -3135,7 +3135,7 @@ branch still exists, as does everything it pointed to. The branch
pointer itself just doesn't, since you replaced it with another one.
There are also other situations that cause dangling objects. For
example, a "dangling blob" may arise because you did a "git add" of a
example, a "dangling blob" may arise because you did a "git-add" of a
file, but then, before you actually committed it and made it part of the
bigger picture, you changed something else in that file and committed
that *updated* thing--the old state that you added originally ends up
@ -3185,7 +3185,7 @@ Usually, dangling blobs and trees aren't very interesting. They're
@@ -3185,7 +3185,7 @@ Usually, dangling blobs and trees aren't very interesting. They're
almost always the result of either being a half-way mergebase (the blob
will often even have the conflict markers from a merge in it, if you
have had conflicting merges that you fixed up by hand), or simply
because you interrupted a "git fetch" with ^C or something like that,
because you interrupted a "git-fetch" with ^C or something like that,
leaving _some_ of the new objects in the object database, but just
dangling and useless.
@ -3694,7 +3694,7 @@ removed. The only thing `--remove` means is that update-index will be
@@ -3694,7 +3694,7 @@ removed. The only thing `--remove` means is that update-index will be
considering a removed file to be a valid thing, and if the file really
does not exist any more, it will update the index accordingly.
As a special case, you can also do `git-update-index --refresh`, which
As a special case, you can also do `git update-index --refresh`, which
will refresh the "stat" information of each index to match the current
stat information. It will 'not' update the object status itself, and
it will only update the fields that are used to quickly test whether
@ -3770,7 +3770,7 @@ from one representation to the other:
@@ -3770,7 +3770,7 @@ from one representation to the other:
Tying it all together
~~~~~~~~~~~~~~~~~~~~~
To commit a tree you have instantiated with "git-write-tree", you'd
To commit a tree you have instantiated with "git write-tree", you'd
create a "commit" object that refers to that tree and the history
behind it--most notably the "parent" commits that preceded it in
$ git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | \
@ -4130,7 +4130,7 @@ just have a look at the first implementation of `cmd_log()`; call
@@ -4130,7 +4130,7 @@ just have a look at the first implementation of `cmd_log()`; call
`git show v1.3.0{tilde}155^2{tilde}4` and scroll down to that function (note that you
no longer need to call `setup_pager()` directly).
Nowadays, `git log` is a builtin, which means that it is _contained_ in the
Nowadays, `git-log` is a builtin, which means that it is _contained_ in the
command `git`. The source side of a builtin is
- a function called `cmd_<bla>`, typically defined in `builtin-<bla>.c`,
@ -4146,7 +4146,7 @@ since they share quite a bit of code. In that case, the commands which are
@@ -4146,7 +4146,7 @@ since they share quite a bit of code. In that case, the commands which are
_not_ named like the `.c` file in which they live have to be listed in
`BUILT_INS` in the `Makefile`.
`git log` looks more complicated in C than it does in the original script,
`git-log` looks more complicated in C than it does in the original script,
but that allows for a much greater flexibility and performance.
Here again it is a good point to take a pause.
@ -4157,9 +4157,9 @@ the organization of Git (after you know the basic concepts).
@@ -4157,9 +4157,9 @@ the organization of Git (after you know the basic concepts).
So, think about something which you are interested in, say, "how can I
access a blob just knowing the object name of it?". The first step is to
find a Git command with which you can do it. In this example, it is either
`git show` or `git cat-file`.
`git-show` or `git-cat-file`.
For the sake of clarity, let's stay with `git cat-file`, because it
For the sake of clarity, let's stay with `git-cat-file`, because it