about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2014-06-22 09:46:16 +0100
committerAlan Pearce2014-06-22 09:46:16 +0100
commit22c44faa609d3d199f97602c0572a0be29ea3a8c (patch)
treee47b95ec78a41b7b5e20ff345b1a02ed94197a2f
parentfdb36530526ddf47deb24914d957e0d20cda4973 (diff)
downloadwebsite-22c44faa609d3d199f97602c0572a0be29ea3a8c.tar.lz
website-22c44faa609d3d199f97602c0572a0be29ea3a8c.tar.zst
website-22c44faa609d3d199f97602c0572a0be29ea3a8c.zip
Add post about cloning similar repositories with git
-rw-r--r--content/post/git-cloning-similar-repositories.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/content/post/git-cloning-similar-repositories.md b/content/post/git-cloning-similar-repositories.md
new file mode 100644
index 0000000..d0eca13
--- /dev/null
+++ b/content/post/git-cloning-similar-repositories.md
@@ -0,0 +1,19 @@
++++
+Categories = ["Development"]
+Description = "Speed up cloning of similar git repositories"
+Tags = ["Development", "git"]
+title = "Cloning Similar Git Repositories"
+date = 2014-06-22T08:35:24Z
++++
+With multiple similar git repositories, for example where a base repository contains a framework or base system installation and other repositories are created from that repository, it's possible to save some time when cloning down another repository by using the `reference` option to [git-clone][]:
+
+	git clone git@github.com/my/repo --reference another-repo
+(Where `another-repo` points to a local version of a repository.)
+
+The reference here doesn't have to be the base repository itself, it could just be another variant of it.  The speedup can be quite dramatic if the repositories have megabytes of shared history, from minutes to seconds.
+
+On a related note, I'm surprised that [GitHub][] doesn't allow for multiple renamed forks, which would be very useful in this scenario.  [BitBucket][] does support this, however.  It even has a 'sync' button for pulling updates from the base into the child repositories, which is very useful, especially for those who prefer GUIs over CLIs.
+
+[git-clone]:https://www.kernel.org/pub/software/scm/git/docs/git-clone.html
+[GitHub]:https://github.com
+[BitBucket]:https://bitbucket.org/
\ No newline at end of file