Git叉子版礼仪 [英] Git fork version etiquette

查看:151
本文介绍了Git叉子版礼仪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在GitHub上分发别人的项目时,更新文件并更新我自己的fork,我该如何版本化fork? 例如,原始项目是1.2.3版本,我添加了一个小错误修复。我会将叉子的版本更改为1.2.4吗?或者我会从版本1开始,因为它本质上是一个单独的项目?



是否有标准或个人偏好?

但是,如果你打算让你的fork紧跟原始仓库(也就是你计划定期将更新从原始版本合并到你的fork中),那么在上游项目的版本号上加上版本号是有意义的。这是一个简单的方法来显示你的软件的上游版本。

FreeNAS 项目使用基于它所基于的FreeBSD版本的主要版本。 FreeNAS当前的9.2版本基于FreeBSD 9.如果基于FreeBSD 9的新版本发布,它可能会被称为版本9.3。如果基于FreeBSD 10在将来某个时候发布新版本,它可能是FreeNas 10.0。



您可能希望将上游的次要版本并入您的版本号同样,但这取决于您的需求以及上游存储库的版本控制策略。


When I fork someone else's project on GitHub, update the files, and update my own fork, how do I version my fork?

For example, the original project is version 1.2.3, and I add a minor bug fix. Would I change the version of my fork to 1.2.4? Or would I start over with version 1 since it's essentially a separate project?

Is there a standard for this or is it personal preference?

解决方案

If your fork is intended to become its own project, feel free to use whatever versioning you wish.

However, if you intend your fork to follow the original repository closely (i.e. you plan to regularly merge updates from the original into your fork), it may make sense to base your version numbers on the upstream project's. This is an easy way to show what upstream version your software is based on.

The FreeNAS project, for example, uses major versioning based on the version of FreeBSD on which it is based. The current 9.2 version of FreeNAS is based on FreeBSD 9. If a new version based on FreeBSD 9 is released, it will likely be called version 9.3. If a new version comes out sometime in the future based on FreeBSD 10, it will likely be FreeNas 10.0.

You may want to incorporate minor releases from upstream into your version number as well, but this depends on your needs and on the versioning strategy of the upstream repository.

这篇关于Git叉子版礼仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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