4

I'm working on a project with a git repository, and I want to export the last changes I have done and send it by e-mail.

I need to know the difference between making a git bundle and making a .patch file, and what is better?

I'm using Tortoise Git, and it give me the option to create the .patch file, and it does not give me the option of creating the git bundle, this means that the .patch file is better?

Thanks

Raúl Otaño
  • 4,640
  • 3
  • 31
  • 65

1 Answers1

2

An incremental bundle would depend on and be applied to another bundle previously created.

To bootstrap the process, you can first create a bundle that does not have any basis.
You can use a tag to remember up to what commit you last processed, in order to make it easy to later update the other repository with an incremental bundle:

But a patch can be applied on any repo.
In your case, a patch is the right choice (similar to the command git format-patch).
You don't need to depend on previous patches, for your patch to be applied on a remote repo.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I didn't write in the question, but I'm supposing both repo are the same repository. I want update both repos. – Raúl Otaño May 06 '13 at 21:33
  • Now I see, the patch can be applied to any repo, doesn't care if both have not the same root... – Raúl Otaño May 06 '13 at 21:36
  • 1
    @RaulOtaño exactly: a patch is just a collection of diff, applied in a certain order. A bundle is a repo in itself, you and only can apply an incremental bundle on top of an existing bundle. – VonC May 06 '13 at 21:37
  • 3
    I made a little test, and tried both, patch and bundle, and I had noticed that the patch create a commit that doesn't match with the original commit (the commit's comment is the same, but the id not), and then, and if I update both projects then int the updated project are two commits, both with the same comment. With the bunlde that doesn't happens. – Raúl Otaño May 06 '13 at 21:40