git版本控制中的补丁是什么? [英] What is a patch in git version control?

查看:270
本文介绍了git版本控制中的补丁是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对git和版本控制都很陌生,所以我想弄清楚一个补丁是什么,它与我在git中做的其他活动有什么不同?



我什么时候应用补丁?每次我提交时都会发生吗?

解决方案

您可以在,由发布Jan AERTS



另请参阅以Git贡献Rails 作为另一个具体的例子。



现在,GitHub拉请求使得它在GitHub repos上很容易应用补丁,这在您不需要时很有用一个直接的贡献者(即你没有权利直接推动回购)。

其实,最近GitHub介绍了 Better Pull Request Emails 以改善新补丁的通知。


I am new to both git and version control so I am trying to figure out what a patch is and how is it different from the rest of activities I do in git?

When do I apply a patch? Does it happen every time I commit?

解决方案

You can see in this blog post how you can create a patch (collection of changes you want to communicate and apply to another repo)


(picture from the 2008 blog post "Bioruby with git: how would that work?", published by Jan AERTS)

See also Contributing to Rails with Git as another concrete example.

Nowadays, the GitHub pull request makes it really easy to apply patches on GitHub repos, which is useful when you aren't a direct contributor (ie you have no right to directly push to a repo).
Actually, fairly recently GitHub introduced "Better Pull Request Emails" to improve the notification of new patches.

这篇关于git版本控制中的补丁是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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