Penguin
Diff: KernelDevelopmentWithGit
EditPageHistoryDiffInfoLikePages

Differences between version 16 and predecessor to the previous major change of KernelDevelopmentWithGit.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 16 Last edited on Monday, November 27, 2006 2:44:57 pm by IanMcDonald Revert
Older page: version 15 Last edited on Monday, July 17, 2006 12:22:11 pm by AristotlePagaltzis Revert
@@ -70,8 +70,14 @@
 <verbatim> 
 git-clone -l -s -n sourcedir/.git destdir 
 </verbatim> 
 This can be useful if you want to sync up to a new kernel tree and want to minimise downloads. 
+  
+If you want to make a copy of a remote tree but reuse existing files that are stored locally do something like:  
+<verbatim>  
+git-clone --reference linus git://git.kernel.org/pub/scm/linux/kernel/git/acme/net-2.6.20.git acme-20  
+</verbatim>  
+This example creates a new git tree which is a copy of acme's remote one, stores it in the directory acme-20 but it also shares files with the git tree in linus. This can be very useful if you keep one tree of Linus' up to date and then keep making copies of other developers trees in this way as they change and can't be pulled easily after they get rebased.  
  
 !Using an origin file 
  
 If you want to do a git pull without having to specify where to get it from everytime edit the file .git/remotes/origin to be in this format where of course you change the URL: