aboutsummaryrefslogtreecommitdiff
path: root/Documentation/tutorial.txt
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-07-16 00:17:42 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-16 09:23:06 -0700
commit0c04094bc153ef1073524267b4eb49989c7b8ccb (patch)
tree29413b70d9271859636ae3f00462ea3347c4916a /Documentation/tutorial.txt
parentf170e4b39d87365cda17b80436ba6db4a2044e88 (diff)
downloadgit-0c04094bc153ef1073524267b4eb49989c7b8ccb.tar.gz
git-0c04094bc153ef1073524267b4eb49989c7b8ccb.tar.xz
[PATCH] Documentation: describe short-hand used in fetch/pull.
Describe short-hand for remote repository used in fetch/pull. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/tutorial.txt')
-rw-r--r--Documentation/tutorial.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
index 8088fd3dc..925ef2c40 100644
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -810,6 +810,34 @@ pull from:
course, you will pay the price of more disk usage to hold
multiple working trees, but disk space is cheap these days. ]
+It is likely that you will be pulling from the same remote
+repository from time to time. As a short hand, you can store
+the remote repository URL in a file under .git/branches/
+directory, like this:
+
+ mkdir -p .git/branches
+ echo rsync://kernel.org/pub/scm/git/git.git/ \
+ >.git/branches/linus
+
+and use the filenae to "git pull" instead of the full URL.
+The contents of a file under .git/branches can even be a prefix
+of a full URL, like this:
+
+ echo rsync://kernel.org/pub/.../jgarzik/
+ >.git/branches/jgarzik
+
+Examples.
+
+ (1) git pull linus
+ (2) git pull linus tag v0.99.1
+ (3) git pull jgarzik/netdev-2.6.git/ e100
+
+the above are equivalent to:
+
+ (1) git pull rsync://kernel.org/pub/scm/git/git.git/ HEAD
+ (2) git pull rsync://kernel.org/pub/scm/git/git.git/ tag v0.99.1
+ (3) git pull rsync://kernel.org/pub/.../jgarzik/netdev-2.6.git e100
+
Publishing your work
--------------------