Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Rather than making a bare clone, I prefer making a <strong><a href="http://schacon.github.com/git/git-bundle.html" rel="nofollow noreferrer">bundle</a></strong> (see "<a href="https://stackoverflow.com/questions/2545765/how-can-i-email-someone-a-git-repository/2545784#2545784">How can I email someone a git repository?</a>"), which generates <em>one</em> file, easier to copy around (on an USB stick for instance)</p> <p>The bonus is that is does have some of the characteristics of a bare repo: you can pull from it or clone it.<br> But only have to worry about <em>one</em> file.</p> <pre><code>machineB$ git clone /home/me/tmp/file.bundle R2 </code></pre> <blockquote> <p>This will define a remote called "<code>origin</code>" in the resulting repository that lets you fetch and pull from the bundle. The <code>$GIT_DIR/config</code> file in <code>R2</code> will have an entry like this:</p> </blockquote> <pre><code>[remote "origin"] url = /home/me/tmp/file.bundle fetch = refs/heads/*:refs/remotes/origin/* </code></pre> <blockquote> <p>To update the resulting mine.git repository, you can fetch or pull after replacing the bundle stored at <code>/home/me/tmp/file.bundle</code> with incremental updates.</p> <p>After working some more in the original repository, you can create an incremental bundle to update the other repository:</p> </blockquote> <pre><code>machineA$ cd R1 machineA$ git bundle create file.bundle lastR2bundle..master machineA$ git tag -f lastR2bundle master </code></pre> <blockquote> <p>You then transfer the bundle to the other machine to replace <code>/home/me/tmp/file.bundle</code>, and pull from it.</p> </blockquote> <pre><code>machineB$ cd R2 machineB$ git pull </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload