Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you only want to backup project files (without history), you can use <a href="http://kernel.org/pub/software/scm/git/docs/git-archive.html" rel="nofollow noreferrer"><code>git archive</code></a> (that way, I do not have to "watch for hidden file")</p> <p>The script <a href="http://github.com/meitar/git-archive-all.sh/blob/master/git-archive-all.sh" rel="nofollow noreferrer"><code>git-archive-all.sh</code></a> will actually archive all git repositories and submodules in the current path.</p> <blockquote> <p>Useful for creating a single tarfile of a git super-project that contains other submodules.</p> </blockquote> <hr> <p>As <a href="https://stackoverflow.com/users/19563/charles-bailey">Charles Bailey</a> rightly mentions in the comments, <strong><a href="http://www.kernel.org/pub/software/scm/git/docs/git-bundle.html" rel="nofollow noreferrer"><code>git bundle</code></a></strong> is more appropriate, to preserve the history. (<code>git bundle</code> was introduced in <a href="https://kerneltrap.org/mailarchive/git/2007/2/21/239365" rel="nofollow noreferrer">February 2007</a>).</p> <p>See <a href="http://heipei.net/2008/03/09/backing-up-a-git-repository-with-git-bundle/" rel="nofollow noreferrer">Backing up a git repository with git bundle</a></p> <blockquote> <p><code>git bundle</code> was designed to allow transfer of git commits when there is no direct connection between repositories (i.e.: offline) but using patches is not an option because of the large number of commits and multiple branches.<br> A <code>git bundle</code> is just one file which can be very easily created and again imported as it can be treated like another remote. A quick example:</p> </blockquote> <pre><code>jojo@dualtron:~/devel$ git bundle create ~/devel.bdl master test </code></pre> <blockquote> <p>and a bundle is saved under <code>~/devel.bdl</code> containing my master and test branches.<br> If I am now at repository B I just use <code>jojo@dualtron:~$ git ls-remote devel.bdl</code> which shows me the branches stored in the bundle.<br> To use the bundle I simple treat it like a remote, using git fetch (for example) </p> </blockquote> <pre><code>jojo@dualtron:~/git/repoB$ git fetch ~/devel.bdl refs/heads/\*:refs/remotes/bundle/\* </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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