<p>Assume two repositories exist as R1 on machine A, and R2 on machine B.\r
For whatever reason, direct connection between A and B is not allowed,\r
but we can move data from A to B via some mechanism (CD, email, etc).\r
-We want to update R2 with developments made on branch master in R1.\r
-We set a tag in R1 (lastR2bundle) after the previous such transport,\r
+We want to update R2 with developments made on branch master in R1.</p>\r
+<p>To create the bundle you have to specify the basis. You have some options:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+Without basis.\r
+</p>\r
+<p>This is useful when sending the whole history.</p>\r
+</li>\r
+</ul>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git bundle create mybundle master</tt></pre>\r
+</div></div>\r
+<ul>\r
+<li>\r
+<p>\r
+Using temporally tags.\r
+</p>\r
+<p>We set a tag in R1 (lastR2bundle) after the previous such transport,\r
and move it afterwards to help build the bundle.</p>\r
-<p>in R1 on A:</p>\r
+</li>\r
+</ul>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git-bundle create mybundle master ^lastR2bundle\r
$ git tag -f lastR2bundle master</tt></pre>\r
</div></div>\r
-<p>(move mybundle from A to B by some mechanism)</p>\r
-<p>in R2 on B:</p>\r
+<ul>\r
+<li>\r
+<p>\r
+Using a tag present in both repositories\r
+</p>\r
+</li>\r
+</ul>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git bundle create mybundle master ^v1.0.0</tt></pre>\r
+</div></div>\r
+<ul>\r
+<li>\r
+<p>\r
+A basis based on time.\r
+</p>\r
+</li>\r
+</ul>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git bundle create mybundle master --since=10.days.ago</tt></pre>\r
+</div></div>\r
+<ul>\r
+<li>\r
+<p>\r
+With a limit on the number of commits\r
+</p>\r
+</li>\r
+</ul>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>$ git bundle create mybundle master -n 10</tt></pre>\r
+</div></div>\r
+<p>Then you move mybundle from A to B, and in R2 on B:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git-bundle verify mybundle\r
-$ git-fetch mybundle refspec</tt></pre>\r
+$ git-fetch mybundle master:localRef</tt></pre>\r
</div></div>\r
-<p>where refspec is refInBundle:localRef</p>\r
-<p>Also, with something like this in your config:</p>\r
-<div class="literalblock">\r
+<p>With something like this in the config in R2:</p>\r
+<div class="listingblock">\r
<div class="content">\r
-<pre><tt>url = /home/me/tmp/file.bdl\r
-fetch = refs/heads/*:refs/remotes/origin/*</tt></pre>\r
+<pre><tt>[remote "bundle"]\r
+ url = /home/me/tmp/file.bdl\r
+ fetch = refs/heads/*:refs/remotes/origin/*</tt></pre>\r
</div></div>\r
<p>You can first sneakernet the bundle file to ~/tmp/file.bdl and\r
-then these commands:</p>\r
+then these commands on machine B:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git ls-remote bundle\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 07-Jan-2008 07:50:03 UTC\r
+Last updated 25-Feb-2008 08:40:21 UTC\r
</div>\r
</div>\r
</body>\r
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