Reputation: 48893
I'd like to share repository as single file.
How can I export history into single file and import it on other side?
Is it possible to limit history with usual git syntax, like v1..v2
?
Upvotes: 3
Views: 90
Reputation: 36412
You probably want to create a git bundle. This will create a package that can be cloned later.
You can do this with the git bundle
command.
Example (taken from Pro Git):
$ git bundle create repo.bundle HEAD master
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 441 bytes, done.
Total 6 (delta 0), reused 0 (delta 0)
$ git clone repo.bundle repo
Cloning into 'repo'...
...
$ cd repo
$ git log --oneline
9a466c5 second commit
b1ec324 first commit
Upvotes: 4