git包和.patch之间的区别 [英] Difference between git bundle and .patch

查看:112
本文介绍了git包和.patch之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用git存储库开发一个项目,我想导出最近完成的更改并通过电子邮件发送。

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.

我需要知道制作 git包和制作 .patch 文件的区别,还有哪些更好?

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

我使用的是Tortoise Git,它给了我创建 .patch 文件的选项,它不会给我创建 git bundle 的选项,这个意味着 .patch 文件更好?

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

推荐答案

增量包将取决于另一个包并应用于其他包以前创建。

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


要引导进程,您可以先创建一个没有任何基础的bundle。

您可以使用标签来记住您最近处理的内容,以便稍后使用一个更新来更新其他存储库增量包:

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:

但是一个补丁可以应用于任何回购。

在你的情况下,一个补丁是正确的选择(类似于命令 git format-patch )。

您无需依赖先前的补丁,因为您的补丁可以应用于远程回购。

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.

这篇关于git包和.patch之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆