-->

Difference between git bundle and .patch

2020-02-10 10:14发布

问题:

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

回答1:

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.