From 0c04094bc153ef1073524267b4eb49989c7b8ccb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Jul 2005 00:17:42 -0700 Subject: [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 Signed-off-by: Linus Torvalds --- Documentation/tutorial.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'Documentation/tutorial.txt') diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt index 8088fd3dce..925ef2c401 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 -------------------- -- cgit v1.2.3