@@ -99,36 +99,62 @@ Assume two repositories exist as R1 on machine A, and R2 on machine B.
9999For whatever reason, direct connection between A and B is not allowed,
100100but we can move data from A to B via some mechanism (CD, email, etc).
101101We want to update R2 with developments made on branch master in R1.
102+
103+ To create the bundle you have to specify the basis. You have some options:
104+
105+ - Without basis.
106+ +
107+ This is useful when sending the whole history.
108+
109+ ------------
110+ $ git bundle create mybundle master
111+ ------------
112+
113+ - Using temporally tags.
114+ +
102115We set a tag in R1 (lastR2bundle) after the previous such transport,
103116and move it afterwards to help build the bundle.
104117
105- in R1 on A:
106-
107118------------
108119$ git-bundle create mybundle master ^lastR2bundle
109120$ git tag -f lastR2bundle master
110121------------
111122
112- (move mybundle from A to B by some mechanism)
123+ - Using a tag present in both repositories
124+
125+ ------------
126+ $ git bundle create mybundle master ^v1.0.0
127+ ------------
128+
129+ - A basis based on time.
130+
131+ ------------
132+ $ git bundle create mybundle master --since=10.days.ago
133+ ------------
113134
114- in R2 on B:
135+ - With a limit on the number of commits
115136
116137------------
117- $ git-bundle verify mybundle
118- $ git-fetch mybundle refspec
138+ $ git bundle create mybundle master -n 10
119139------------
120140
121- where refspec is refInBundle:localRef
141+ Then you move mybundle from A to B, and in R2 on B:
122142
143+ ------------
144+ $ git-bundle verify mybundle
145+ $ git-fetch mybundle master:localRef
146+ ------------
123147
124- Also, with something like this in your config:
148+ With something like this in the config in R2 :
125149
150+ ------------------------
126151[remote "bundle"]
127152 url = /home/me/tmp/file.bdl
128153 fetch = refs/heads/*:refs/remotes/origin/*
154+ ------------------------
129155
130156You can first sneakernet the bundle file to ~/tmp/file.bdl and
131- then these commands:
157+ then these commands on machine B :
132158
133159------------
134160$ git ls-remote bundle
0 commit comments