summaryrefslogtreecommitdiff
path: root/Documentation/git-bundle.txt
diff options
context:
space:
mode:
authorSanti Béjar <sbejar@gmail.com>2008-02-24 14:42:40 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-24 18:51:46 -0800
commit99d8ea2c5ce6fc0b06fe8a43e7c0c108ddad853b (patch)
tree4cf54c0a7327b2fe167922d3d40992b6b78bd0c9 /Documentation/git-bundle.txt
parent8e0fbe671f6a63b885702917bf4e7d7a85c59ab4 (diff)
downloadgit-99d8ea2c5ce6fc0b06fe8a43e7c0c108ddad853b.tar.gz
git-bundle.txt: Add different strategies to create the bundle
Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-bundle.txt')
-rw-r--r--Documentation/git-bundle.txt44
1 files changed, 35 insertions, 9 deletions
diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 72f080a972..505ac056e6 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -99,36 +99,62 @@ Assume two repositories exist as R1 on machine A, and R2 on machine B.
For whatever reason, direct connection between A and B is not allowed,
but we can move data from A to B via some mechanism (CD, email, etc).
We want to update R2 with developments made on branch master in R1.
+
+To create the bundle you have to specify the basis. You have some options:
+
+- Without basis.
++
+This is useful when sending the whole history.
+
+------------
+$ git bundle create mybundle master
+------------
+
+- Using temporally tags.
++
We set a tag in R1 (lastR2bundle) after the previous such transport,
and move it afterwards to help build the bundle.
-in R1 on A:
-
------------
$ git-bundle create mybundle master ^lastR2bundle
$ git tag -f lastR2bundle master
------------
-(move mybundle from A to B by some mechanism)
+- Using a tag present in both repositories
+
+------------
+$ git bundle create mybundle master ^v1.0.0
+------------
+
+- A basis based on time.
+
+------------
+$ git bundle create mybundle master --since=10.days.ago
+------------
-in R2 on B:
+- With a limit on the number of commits
------------
-$ git-bundle verify mybundle
-$ git-fetch mybundle refspec
+$ git bundle create mybundle master -n 10
------------
-where refspec is refInBundle:localRef
+Then you move mybundle from A to B, and in R2 on B:
+------------
+$ git-bundle verify mybundle
+$ git-fetch mybundle master:localRef
+------------
-Also, with something like this in your config:
+With something like this in the config in R2:
+------------------------
[remote "bundle"]
url = /home/me/tmp/file.bdl
fetch = refs/heads/*:refs/remotes/origin/*
+------------------------
You can first sneakernet the bundle file to ~/tmp/file.bdl and
-then these commands:
+then these commands on machine B:
------------
$ git ls-remote bundle