如何将代码贡献回开源项目?

时间:2021-01-19 00:20:57

If you're following an Open Source project and would like to contribute code changes, what will you need to do?

如果您正在关注开源项目并希望提供代码更改,那么您需要做什么?

10 个解决方案

#1


18  

I would spend time getting to know the people first. Usually they have a IRC chatroom where everyone idles. Spend sometime getting to know the people, study the code, review the documentation, then if you feel like you are a correct fit for the project, start contributing to bug patches. Don't try to add new features at first. They won't generally be accepted.

我会花时间先了解这些人。通常他们有一个IRC聊天室,每个人都闲着。花一些时间去了解人,研究代码,查看文档,然后如果你觉得自己适合项目,那么就开始为bug补丁做贡献。首先不要尝试添加新功能。他们通常不会被接受。

Also watch this google tech talk about How To Protect Your Open Source Project from Poisonous People. It will teach you what not to do.

还要观看这篇关于如何从有毒人群中保护您的开源项目的Google技术谈话。它会教你不该做什么。

#2


7  

The best way to do this is introduce yourself like this "Hi, Here's a bug/feature and here's a patch that fixes/implements it."

这样做的最好方法是自我介绍“嗨,这是一个错误/功能,这里是修补/实现它的补丁。”

I'm on a couple of open source projects, and there are lots of people with the best intentions to help but who never actually do anything, so if you show up with working code you will be considered much more valuable.

我参与了几个开源项目,很多人都有最好的帮助,但从来没有做过任何事情,所以如果你出现在工作代码中,你会被认为更有价值。

#3


4  

As previous posters have said, it's a matter for the project. You will find that some are more open to change than others. From a mechanical perspective, you will need to see if they use SVN (for example on google code) or CVS (for example on sourceforge) and determine if they use patch or some other method.

正如之前的海报所说,这是项目的问题。你会发现有些人比其他人更容易改变。从机械角度来看,您需要查看他们是否使用SVN(例如在谷歌代码上)或CVS(例如在sourceforge上)并确定他们是否使用补丁或其他方法。

A good example of the sort of procedure you might need to employ can be seen on the gimp site: http://www.gimp.org/bugs/howtos/submit-patch.html Note their use of Bugzilla, patch and CVS

您可能需要使用的程序的一个很好的例子可以在gimp网站上看到:http://www.gimp.org/bugs/howtos/submit-patch.html注意他们使用Bugzilla,补丁和CVS

#4


4  

As the creator of several open source projects, I'm on the other side of things in that I'm trying to get contributors. Here's what I would say:

作为几个开源项目的创建者,我正处于事物的另一面,因为我正在努力争取贡献者。这就是我要说的:

  • Announce yourself in whichever way is appropriate for the project: email, mailing list, forum, etc
  • 以适合该项目的方式宣布自己:电子邮件,邮件列表,论坛等

  • See whether your idea is already in the works. If so, maybe try to help out rather than duplicating efforts.
  • 看看你的想法是否已经在实施中。如果是这样,也许可以尝试帮助而不是重复努力。

  • Find out the preferred way to submit code
  • 找出提交代码的首选方式

  • Be sure to follow the coding styles used in the project. (If you decide to convert all tabs to spaces, they won't be able to merge your changes into their version control system easily and will more than likely ignore your submission.)
  • 请务必遵循项目中使用的编码样式。 (如果您决定将所有选项卡转换为空格,则它们将无法轻松地将您的更改合并到其版本控制系统中,并且很可能会忽略您的提交。)

#5


3  

Things like this used to be simple.

这样的事情过去很简单。

There was a mailing list for users and one for developers. If you see a problem and can fix it fix it and then run Larry Wall's Patch and send the resulting patch to the devs list with a quick explanation of what it does. Generally a dev with write access to the CVS (or in the real old days whose floppy the project resided on ;) ) would check things over and if your patch does what it says on the tin and doesn't break anything else it gets into the source tree proper.

有一个用户的邮件列表和一个开发人员的邮件列表。如果您发现问题并且可以修复它并修复它,然后运行Larry Wall的补丁并将生成的补丁发送到开发人员列表,并快速解释它的作用。一般来说,对CVS具有写访问权限的开发人员(或者在过去的软件项目所在的真实时代;))会检查事情,如果你的补丁完成它在锡上所说的内容,并且不会破坏它进入的任何其他内容源树本身。

These days there are many, many more projects using open development and lots of them are run by people who have never run a software project before let alone an open sourced one so things can be more tricky. Generally mailing a patch to someone doing lots of dev in the right area of the project gets the right eyes looking at it quickly even today. A browse of the online repository will tell you the folks who do the work rather than those who get their names on the front page of the web site, contact those guys first :)

如今,有很多很多项目都在使用开放式开发,很多项目都是由那些从未运行过软件项目的人运行,而更不用说开源项目了,所以事情可能会更棘手。通常将补丁邮寄给在项目的正确区域内做很多开发的人,即使在今天也能快速地看到它。浏览在线存储库会告诉你做这项工作的人而不是那些在网站首页上得到他们名字的人,先联系那些人:)

#6


3  

A couple of other things to keep in mind:

还有几点要记住:

  • Be certain that you actually own the code you want to contribute back, and not your employer or the client you made the modifications for. Check your employment agreement or service agreement if there's a possibility you're in such a situation.

    确保您实际拥有您想要回馈的代码,而不是您的雇主或您进行修改的客户。如果您有可能出现这种情况,请查看您的雇佣协议或服务协议。

  • Investigate whether there's an intellectual property assignment process that the developers prefer contributors go through. These days many Open Source projects have such assignments, so that all rights to the code in the project can be owned by the project itself and/or its sponsor.

    调查是否存在开发人员更喜欢贡献者的知识产权分配流程。目前,许多开源项目都有这样的任务,因此项目中代码的所有权利都可以由项目本身和/或其赞助商拥有。

Both of these are important when it comes to protecting yourself, the project, and anyone who wants to use or build on the project downstream from claims related to the code you wrote.

在保护自己,项目以及任何想要在下游项目中使用或构建与您编写的代码相关的声明的人时,这两者都很重要。

#7


3  

If you're looking for ways to get involved on a smaller scale (maybe to work your way up) OpenHatch has a searchable database of bugs (sorted by language/framework) as well as a great tutorial for getting started.

如果您正在寻找更小规模的参与方式(也许是为了解决方案),OpenHatch有一个可搜索的错误数据库(按语言/框架排序)以及一个很好的入门教程。

Another way to start is CodeTriage which has GitHub repos looking for help fixing open issues that are also organized by language.

另一种开始的方式是CodeTriage,它有GitHub repos寻找帮助修复也是由语言组织的开放问题。

#8


1  

The first thing you should do is contact the main people who run the open source project. Ask them if it is ok to contribute to the code and go from there.

您应该做的第一件事是联系运行开源项目的主要人员。询问他们是否可以为代码做出贡献并从那里开始。

Simply writing your improved code and then giving it to them may result in your code being rejected.

只需编写改进的代码然后将其提供给它们可能会导致代码被拒绝。

#9


0  

It depends on the project, how and where it is hosted. The best thing is to find a contact and email them or see if there is a developers mailing list.

这取决于项目,托管的方式和位置。最好的方法是找到一个联系人并通过电子邮件发送或查看是否有开发者邮件列表。

#10


0  

Get chatting in IRC or browse through the newsgroups if they have one. make yourself known. You may need to submit patches to a newsgroup before you are given an account to submit yourself.

在IRC中聊天或浏览新闻组(如果有的话)。让自己知道。在您获得自己提交的帐户之前,您可能需要向新闻组提交补丁。

Get familiar with coding standards, patch types (e.g. unified diff) and checkout a copy of their CVS or SVN if they allow anonymous access.

熟悉编码标准,补丁类型(例如统一差异)并检查其CVS或SVN的副本(如果它们允许匿名访问)。

#1


18  

I would spend time getting to know the people first. Usually they have a IRC chatroom where everyone idles. Spend sometime getting to know the people, study the code, review the documentation, then if you feel like you are a correct fit for the project, start contributing to bug patches. Don't try to add new features at first. They won't generally be accepted.

我会花时间先了解这些人。通常他们有一个IRC聊天室,每个人都闲着。花一些时间去了解人,研究代码,查看文档,然后如果你觉得自己适合项目,那么就开始为bug补丁做贡献。首先不要尝试添加新功能。他们通常不会被接受。

Also watch this google tech talk about How To Protect Your Open Source Project from Poisonous People. It will teach you what not to do.

还要观看这篇关于如何从有毒人群中保护您的开源项目的Google技术谈话。它会教你不该做什么。

#2


7  

The best way to do this is introduce yourself like this "Hi, Here's a bug/feature and here's a patch that fixes/implements it."

这样做的最好方法是自我介绍“嗨,这是一个错误/功能,这里是修补/实现它的补丁。”

I'm on a couple of open source projects, and there are lots of people with the best intentions to help but who never actually do anything, so if you show up with working code you will be considered much more valuable.

我参与了几个开源项目,很多人都有最好的帮助,但从来没有做过任何事情,所以如果你出现在工作代码中,你会被认为更有价值。

#3


4  

As previous posters have said, it's a matter for the project. You will find that some are more open to change than others. From a mechanical perspective, you will need to see if they use SVN (for example on google code) or CVS (for example on sourceforge) and determine if they use patch or some other method.

正如之前的海报所说,这是项目的问题。你会发现有些人比其他人更容易改变。从机械角度来看,您需要查看他们是否使用SVN(例如在谷歌代码上)或CVS(例如在sourceforge上)并确定他们是否使用补丁或其他方法。

A good example of the sort of procedure you might need to employ can be seen on the gimp site: http://www.gimp.org/bugs/howtos/submit-patch.html Note their use of Bugzilla, patch and CVS

您可能需要使用的程序的一个很好的例子可以在gimp网站上看到:http://www.gimp.org/bugs/howtos/submit-patch.html注意他们使用Bugzilla,补丁和CVS

#4


4  

As the creator of several open source projects, I'm on the other side of things in that I'm trying to get contributors. Here's what I would say:

作为几个开源项目的创建者,我正处于事物的另一面,因为我正在努力争取贡献者。这就是我要说的:

  • Announce yourself in whichever way is appropriate for the project: email, mailing list, forum, etc
  • 以适合该项目的方式宣布自己:电子邮件,邮件列表,论坛等

  • See whether your idea is already in the works. If so, maybe try to help out rather than duplicating efforts.
  • 看看你的想法是否已经在实施中。如果是这样,也许可以尝试帮助而不是重复努力。

  • Find out the preferred way to submit code
  • 找出提交代码的首选方式

  • Be sure to follow the coding styles used in the project. (If you decide to convert all tabs to spaces, they won't be able to merge your changes into their version control system easily and will more than likely ignore your submission.)
  • 请务必遵循项目中使用的编码样式。 (如果您决定将所有选项卡转换为空格,则它们将无法轻松地将您的更改合并到其版本控制系统中,并且很可能会忽略您的提交。)

#5


3  

Things like this used to be simple.

这样的事情过去很简单。

There was a mailing list for users and one for developers. If you see a problem and can fix it fix it and then run Larry Wall's Patch and send the resulting patch to the devs list with a quick explanation of what it does. Generally a dev with write access to the CVS (or in the real old days whose floppy the project resided on ;) ) would check things over and if your patch does what it says on the tin and doesn't break anything else it gets into the source tree proper.

有一个用户的邮件列表和一个开发人员的邮件列表。如果您发现问题并且可以修复它并修复它,然后运行Larry Wall的补丁并将生成的补丁发送到开发人员列表,并快速解释它的作用。一般来说,对CVS具有写访问权限的开发人员(或者在过去的软件项目所在的真实时代;))会检查事情,如果你的补丁完成它在锡上所说的内容,并且不会破坏它进入的任何其他内容源树本身。

These days there are many, many more projects using open development and lots of them are run by people who have never run a software project before let alone an open sourced one so things can be more tricky. Generally mailing a patch to someone doing lots of dev in the right area of the project gets the right eyes looking at it quickly even today. A browse of the online repository will tell you the folks who do the work rather than those who get their names on the front page of the web site, contact those guys first :)

如今,有很多很多项目都在使用开放式开发,很多项目都是由那些从未运行过软件项目的人运行,而更不用说开源项目了,所以事情可能会更棘手。通常将补丁邮寄给在项目的正确区域内做很多开发的人,即使在今天也能快速地看到它。浏览在线存储库会告诉你做这项工作的人而不是那些在网站首页上得到他们名字的人,先联系那些人:)

#6


3  

A couple of other things to keep in mind:

还有几点要记住:

  • Be certain that you actually own the code you want to contribute back, and not your employer or the client you made the modifications for. Check your employment agreement or service agreement if there's a possibility you're in such a situation.

    确保您实际拥有您想要回馈的代码,而不是您的雇主或您进行修改的客户。如果您有可能出现这种情况,请查看您的雇佣协议或服务协议。

  • Investigate whether there's an intellectual property assignment process that the developers prefer contributors go through. These days many Open Source projects have such assignments, so that all rights to the code in the project can be owned by the project itself and/or its sponsor.

    调查是否存在开发人员更喜欢贡献者的知识产权分配流程。目前,许多开源项目都有这样的任务,因此项目中代码的所有权利都可以由项目本身和/或其赞助商拥有。

Both of these are important when it comes to protecting yourself, the project, and anyone who wants to use or build on the project downstream from claims related to the code you wrote.

在保护自己,项目以及任何想要在下游项目中使用或构建与您编写的代码相关的声明的人时,这两者都很重要。

#7


3  

If you're looking for ways to get involved on a smaller scale (maybe to work your way up) OpenHatch has a searchable database of bugs (sorted by language/framework) as well as a great tutorial for getting started.

如果您正在寻找更小规模的参与方式(也许是为了解决方案),OpenHatch有一个可搜索的错误数据库(按语言/框架排序)以及一个很好的入门教程。

Another way to start is CodeTriage which has GitHub repos looking for help fixing open issues that are also organized by language.

另一种开始的方式是CodeTriage,它有GitHub repos寻找帮助修复也是由语言组织的开放问题。

#8


1  

The first thing you should do is contact the main people who run the open source project. Ask them if it is ok to contribute to the code and go from there.

您应该做的第一件事是联系运行开源项目的主要人员。询问他们是否可以为代码做出贡献并从那里开始。

Simply writing your improved code and then giving it to them may result in your code being rejected.

只需编写改进的代码然后将其提供给它们可能会导致代码被拒绝。

#9


0  

It depends on the project, how and where it is hosted. The best thing is to find a contact and email them or see if there is a developers mailing list.

这取决于项目,托管的方式和位置。最好的方法是找到一个联系人并通过电子邮件发送或查看是否有开发者邮件列表。

#10


0  

Get chatting in IRC or browse through the newsgroups if they have one. make yourself known. You may need to submit patches to a newsgroup before you are given an account to submit yourself.

在IRC中聊天或浏览新闻组(如果有的话)。让自己知道。在您获得自己提交的帐户之前,您可能需要向新闻组提交补丁。

Get familiar with coding standards, patch types (e.g. unified diff) and checkout a copy of their CVS or SVN if they allow anonymous access.

熟悉编码标准,补丁类型(例如统一差异)并检查其CVS或SVN的副本(如果它们允许匿名访问)。