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

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

问题描述

我对 git 和版本控制都不熟悉,所以我想弄清楚补丁是什么以及它与我在 git 中所做的其他活动有何不同?

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

解决方案

你可以在这个",由 Jan AERTS 发布)

另请参阅使用 Git 为 Rails 做出贡献 作为另一个具体内容示例.

如今,GitHub 拉取请求使得在 GitHub 上应用补丁变得非常容易存储库,当您不是直接贡献者时非常有用(即您无权直接推送到存储库).
实际上,最近 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天全站免登陆