3

I've created a bundle file of a private project of mine, and I would like to share it with someone. They ask me to provide the git bundle file generated.

Can I just email them the single bundle file? ...or do I need to attach the folder of the project itself as well?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
Beppe
  • 189
  • 2
  • 4
  • 14
  • 2
    A bundle is a self contained file. Just send them the one file. `git bundle create ../reponame.bundle --all --tags`. – Jonathon Reinhart Feb 14 '16 at 13:25
  • Considering the title of that old question I answered in 2010, you can email the file: http://stackoverflow.com/a/2545784/6309 – VonC Feb 14 '16 at 13:33
  • I used this command --> git bundle create project.bundle master. What is the difference from the one above? – Beppe Feb 14 '16 at 13:36
  • The recipient can use `git clone` (assuming the bundle was made with --all) to recreate the full repo, though it's origin will be set to the bundle! – Philip Oakley Feb 14 '16 at 19:17

1 Answers1

2

Can I just email them the single bundle file?

Yep, that the point behind the bundle.
Its a full read-only repository.

Once you have the bundle you can share it.


git bundle will only package references that are shown by git show-ref: this includes heads, tags, and remote heads.


git bundle create ../reponame.bundle --all

--all- get all refs

This command creates bundle with all the source code and all other info like tags.

Even due that --all is not documented its much better to use it.

Note : --all would not include remote-tracking branches !!!

CodeWizard
  • 128,036
  • 21
  • 144
  • 167