[PATCH] Updates to tutorial.txt
Fix a few typos. Adapt to git-http-pull not borking on packed repositories. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
3206014a51
commit
ade75a59fd
@ -241,7 +241,7 @@ creating the equivalent of a git "directory" object:
|
|||||||
git-write-tree
|
git-write-tree
|
||||||
|
|
||||||
and this will just output the name of the resulting tree, in this case
|
and this will just output the name of the resulting tree, in this case
|
||||||
(if you have does exactly as I've described) it should be
|
(if you have done exactly as I've described) it should be
|
||||||
|
|
||||||
8988da15d077d4829fc51d8544c097def6644dbb
|
8988da15d077d4829fc51d8544c097def6644dbb
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ message ever again.
|
|||||||
|
|
||||||
Again, normally you'd never actually do this by hand. There is a
|
Again, normally you'd never actually do this by hand. There is a
|
||||||
helpful script called "git commit" that will do all of this for you. So
|
helpful script called "git commit" that will do all of this for you. So
|
||||||
you could have just writtten
|
you could have just written
|
||||||
|
|
||||||
git commit
|
git commit
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ have committed something, we can also learn to use a new command:
|
|||||||
|
|
||||||
Unlike "git-diff-files", which showed the difference between the index
|
Unlike "git-diff-files", which showed the difference between the index
|
||||||
file and the working directory, "git-diff-cache" shows the differences
|
file and the working directory, "git-diff-cache" shows the differences
|
||||||
between a committed _tree_ and either the the index file or the working
|
between a committed _tree_ and either the index file or the working
|
||||||
directory. In other words, git-diff-cache wants a tree to be diffed
|
directory. In other words, git-diff-cache wants a tree to be diffed
|
||||||
against, and before we did the commit, we couldn't do that, because we
|
against, and before we did the commit, we couldn't do that, because we
|
||||||
didn't have anything to diff against.
|
didn't have anything to diff against.
|
||||||
@ -482,7 +482,7 @@ particular state. You can, for example, do
|
|||||||
|
|
||||||
to diff your current state against that tag (which at this point will
|
to diff your current state against that tag (which at this point will
|
||||||
obviously be an empty diff, but if you continue to develop and commit
|
obviously be an empty diff, but if you continue to develop and commit
|
||||||
stuff, you can use your tag as a "anchor-point" to see what has changed
|
stuff, you can use your tag as an "anchor-point" to see what has changed
|
||||||
since you tagged it.
|
since you tagged it.
|
||||||
|
|
||||||
A "signed tag" is actually a real git object, and contains not only a
|
A "signed tag" is actually a real git object, and contains not only a
|
||||||
@ -800,16 +800,13 @@ pull from:
|
|||||||
|
|
||||||
GIT URL
|
GIT URL
|
||||||
git://remote.machine/path/to/repo.git/
|
git://remote.machine/path/to/repo.git/
|
||||||
|
|
||||||
|
SSH URL
|
||||||
remote.machine:/path/to/repo.git/
|
remote.machine:/path/to/repo.git/
|
||||||
|
|
||||||
Local directory
|
Local directory
|
||||||
/path/to/repo.git/
|
/path/to/repo.git/
|
||||||
|
|
||||||
[ Side Note: currently, HTTP transport is slightly broken in
|
|
||||||
that when the remote repository is "packed" they do not always
|
|
||||||
work. But we have not talked about packing repository yet, so
|
|
||||||
let's not worry too much about it for now. ]
|
|
||||||
|
|
||||||
[ Digression: you could do without using any branches at all, by
|
[ Digression: you could do without using any branches at all, by
|
||||||
keeping as many local repositories as you would like to have
|
keeping as many local repositories as you would like to have
|
||||||
branches, and merging between them with "git pull", just like
|
branches, and merging between them with "git pull", just like
|
||||||
@ -829,7 +826,7 @@ directory, like this:
|
|||||||
echo rsync://kernel.org/pub/scm/git/git.git/ \
|
echo rsync://kernel.org/pub/scm/git/git.git/ \
|
||||||
>.git/branches/linus
|
>.git/branches/linus
|
||||||
|
|
||||||
and use the filenae to "git pull" instead of the full URL.
|
and use the filename to "git pull" instead of the full URL.
|
||||||
The contents of a file under .git/branches can even be a prefix
|
The contents of a file under .git/branches can even be a prefix
|
||||||
of a full URL, like this:
|
of a full URL, like this:
|
||||||
|
|
||||||
@ -983,10 +980,11 @@ would remove them for you.
|
|||||||
You can try running "find .git/objects -type f" before and after
|
You can try running "find .git/objects -type f" before and after
|
||||||
you run "git prune-packed" if you are curious.
|
you run "git prune-packed" if you are curious.
|
||||||
|
|
||||||
[ Side Note: as we already mentioned, "git pull" is broken for
|
[ Side Note: "git pull" is slightly cumbersome for HTTP transport,
|
||||||
some transports dealing with packed repositories right now, so
|
as a packed repository may contain relatively few objects in a
|
||||||
do not run "git prune-packed" if you plan to give "git pull"
|
relatively large pack. If you expect many HTTP pulls from your
|
||||||
access via HTTP transport for now. ]
|
public repository you might want to repack & prune often, or
|
||||||
|
never. ]
|
||||||
|
|
||||||
If you run "git repack" again at this point, it will say
|
If you run "git repack" again at this point, it will say
|
||||||
"Nothing to pack". Once you continue your development and
|
"Nothing to pack". Once you continue your development and
|
||||||
@ -998,7 +996,7 @@ project from scratch), and then run "git repack" every once in a
|
|||||||
while, depending on how active your project is.
|
while, depending on how active your project is.
|
||||||
|
|
||||||
When a repository is synchronized via "git push" and "git pull",
|
When a repository is synchronized via "git push" and "git pull",
|
||||||
objects packed in the source repository is usually stored
|
objects packed in the source repository are usually stored
|
||||||
unpacked in the destination, unless rsync transport is used.
|
unpacked in the destination, unless rsync transport is used.
|
||||||
|
|
||||||
|
|
||||||
@ -1048,8 +1046,8 @@ A recommended workflow for a "project lead" goes like this:
|
|||||||
Go back to step (5) and continue working.
|
Go back to step (5) and continue working.
|
||||||
|
|
||||||
|
|
||||||
A recommended work cycle for a "subsystem maintainer" that works
|
A recommended work cycle for a "subsystem maintainer" who works
|
||||||
on that project and has own "public repository" goes like this:
|
on that project and has an own "public repository" goes like this:
|
||||||
|
|
||||||
(1) Prepare your work repository, by "git clone" the public
|
(1) Prepare your work repository, by "git clone" the public
|
||||||
repository of the "project lead". The URL used for the
|
repository of the "project lead". The URL used for the
|
||||||
@ -1058,8 +1056,8 @@ on that project and has own "public repository" goes like this:
|
|||||||
(2) Prepare a public repository accessible to others.
|
(2) Prepare a public repository accessible to others.
|
||||||
|
|
||||||
(3) Copy over the packed files from "project lead" public
|
(3) Copy over the packed files from "project lead" public
|
||||||
repository to your public repository by hand; this part is
|
repository to your public repository by hand; preferrably
|
||||||
currently not automated.
|
use rsync for that task.
|
||||||
|
|
||||||
(4) Push into the public repository from your primary
|
(4) Push into the public repository from your primary
|
||||||
repository. Run "git repack", and possibly "git
|
repository. Run "git repack", and possibly "git
|
||||||
|
Loading…
Reference in New Issue
Block a user