Fork (software development)
Fork (software development)
In software engineering, a project fork happens when developers take a copy of source code from one software package and start independent development on it, creating a distinct and separate piece of software. The term often implies not merely a development branch, but also a split in the developer community, a form of schism.[1]
Etymology
The word "fork" has been used to mean "to divide in branches, go separate ways" as early as the 14th century.[2] In the software environment, the word evokes the fork system call, which causes a running process to split itself into two (almost) identical copies that (typically) diverge to perform different tasks.[3]
In the context of software development, "fork" was used in the sense of creating a revision control "branch" by Eric Allman as early as 1980, in the context of SCCS:[4]
Creating a branch "forks off" a version of the program.
"Fork" is not known to have been used in the sense of a community schism during the origins of Lucid Emacs (now XEmacs) (1991) or the BSDs (1993–1994); Russ Nelson used the term "shattering" for this sort of fork in 1993, attributing it to John Gilmore.[6] However, "fork" was in use in the present sense by 1995 to describe the XEmacs split,[7] and was an understood usage in the GNU Project by 1996.[8]
Forking of free and open-source software
Free and open-source software may be legally forked without prior approval of those currently developing, managing, or distributing the software per both The Free Software Definition and The Open Source Definition:[9]
The freedom to distribute copies of your modified versions to others (freedom 3).
By doing this, you can give the whole community a chance to benefit from your changes.
Access to the source code is a precondition for this.— The Free Software Definition[10]
- Derived Works: The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.— The Open Source Definition[11]
In free software, forks often result from a schism over different goals or personality clashes.
In a fork, both parties assume nearly identical code bases, but typically only the larger group, or whoever controls the Web site, will retain the full original name and the associated user community.
Thus, there is a reputation penalty associated with forking.[9] The relationship between the different teams can be cordial or very bitter.
Forking is considered a Bad Thing—not merely because it implies a lot of wasted effort in the future, but because forks tend to be accompanied by a great deal of strife and acrimony between the successor groups over issues of legitimacy, succession, and design direction.
There is serious social pressure against forking.
As a result, major forks (such as the Gnu-Emacs/XEmacs split, the fissioning of the 386BSD group into three daughter projects, and the short-lived GCC/EGCS split) are rare enough that they are remembered individually in hacker folklore.
David A. Wheeler notes[9] four possible outcomes of a fork, with examples:
The death of the fork.
This is by far the most common case.
It is easy to declare a fork, but considerable effort to continue independent development and support.
A re-merging of the fork (e.g., egcs becoming "blessed" as the new version of gcc.)
The death of the original (e.g. the X.Org Server succeeding and XFree86 dying.)
Successful branching, typically with differentiation (e.g., OpenBSD and NetBSD.)
Distributed revision control (DVCS) tools have popularised a less emotive use of the term "fork", blurring the distinction with "branch".[14] With a DVCS such as Mercurial or Git, the normal way to contribute to a project, is to first create a personal branch of the repository, independent of the main repository, and later seek to have your changes integrated with it. Sites such as GitHub, Bitbucket and Launchpad provide free DVCS hosting expressly supporting independent branches, such that the technical, social and financial barriers to forking a source code repository are massively reduced, and GitHub uses "fork" as its term for this method of contribution to a project.
Forking proprietary software
In proprietary software, the copyright is usually held by the employing entity, not by the individual software developers. Proprietary code is thus more commonly forked when the owner needs to develop two or more versions, such as a windowed version and a command line version, or versions for differing operating systems, such as a word processor for IBM PC compatible machines and Macintosh computers. Generally, such internal forks will concentrate on having the same look, feel, data format, and behavior between platforms so that a user familiar with one can also be productive or share documents generated on the other. This is almost always an economic decision to generate a greater market share and thus pay back the associated extra development costs created by the fork.
The BSD licenses permit forks to become proprietary software, and some say that commercial incentives thus make proprietisation almost inevitable. Examples include macOS (based on the proprietary NeXTSTEP and the open source FreeBSD), Cedega and CrossOver (proprietary forks of Wine, though CrossOver tracks Wine and contributes considerably), EnterpriseDB (a fork of PostgreSQL, adding Oracle compatibility features[17]), Supported PostgreSQL with their proprietary ESM storage system,[18] and Netezza's[19] proprietary highly scalable derivative of PostgreSQL. Some of these vendors contribute back changes to the community project, while some keep their changes as their own competitive advantages.
See also
List of software forks
Source port
Downstream (software development)
Group decision-making
Modular programming Modding
Custom software
Personalization
Team effectiveness Duplicate code
ROM Hacking