@matheusbsbs / matheus-bagliano / commits / 99d8ea2c5c
Fork 0

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>

Santi Béjar committed Feb 24, 2008 at 14:42 UTC 99d8ea2c5ce6fc0b06fe8a43e7c0c108ddad853b
1 file changed +35 -9
Documentation/git-bundle.txt
+35 -9
@@ -99,36 +99,62 @@ Assume two repositories exist as R1 on machine A, and R2 on machine B.
99 For whatever reason, direct connection between A and B is not allowed,
100 but we can move data from A to B via some mechanism (CD, email, etc).
101 We 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 ++
115 We set a tag in R1 (lastR2bundle) after the previous such transport,
116 and move it afterwards to help build the bundle.
117
105 -in R1 on A:
106 -
118 ------------
119 $ git-bundle create mybundle master ^lastR2bundle
120 $ git tag -f lastR2bundle master
121 ------------
122
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 +------------
134
114 -in R2 on B:
135 +- With a limit on the number of commits
136
137 ------------
117 -$ git-bundle verify mybundle
118 -$ git-fetch mybundle refspec
138 +$ git bundle create mybundle master -n 10
139 ------------
140
121 -where refspec is refInBundle:localRef
141 +Then you move mybundle from A to B, and in R2 on B:
142
143 +------------
144 +$ git-bundle verify mybundle
145 +$ git-fetch mybundle master:localRef
146 +------------
147
124 -Also, with something like this in your config:
148 +With something like this in the config in R2:
149
150 +------------------------
151 [remote "bundle"]
152 url = /home/me/tmp/file.bdl
153 fetch = refs/heads/*:refs/remotes/origin/*
154 +------------------------
155
156 You can first sneakernet the bundle file to ~/tmp/file.bdl and
131 -then these commands:
157 +then these commands on machine B:
158
159 ------------
160 $ git ls-remote bundle