In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software.
Free and open source software is that which, by definition, may be forked from the original development team without prior permission without violating any copyright law. However, licensed forks of proprietary software (e.g. Unix) also happen.
The term fork in this context derives from the use of the term (see Fork (operating system)) in computer operating systems (especially Unix) where it refers to the creation of a copy of a running program (process) by forking a process, which creates two identical processes (like cell division in living things); the two are then independent, and may proceed to do different tasks, as the program dictates. The independent development of two software projects cloned from the same source code is analogous to Unix forking.
A kind of internal fork that is standard practice within many software projects is a stable or release version, modified only for bug fixes, while a development tree develops new features. Such internal forks are usually referred to as "branches".
Free and open source software may be legally forked with no prior permission, per the definitions of "free software" copyright license ("Freedom 3: The freedom to improve the program, and release your improvements to the public, so that the whole community benefits") and "open source" ("3. Derived Works: redistribution of modifications must be allowed. (To allow legal sharing and to permit new features or repairs.)").
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. The relationship between the different teams can be cordial or very bitter.
Forks are considered an expression of the freedom made available by free and open source software software, but a weakness since they duplicate development efforts and can confuse users over which forked package to use. Developers have the option to collaborate and pool resources with free and open source software software, but it is not ensured by free software licenses, only by a commitment to cooperation.
The Cathedral and the Bazaar stated in 1997 that "The most important characteristic of a fork is that it spawns competing projects that cannot later exchange code, splitting the potential developer community". However, this is not common present usage.
In some cases, a fork can merge back into the original project or replace it. EGCS (the Experimental/Enhanced GNU Compiler System) was a fork from GCC which proved more vital than the original project and was eventually "blessed" as the official GCC project. Some have attempted to invoke this effect deliberately, e.g., Mozilla Firefox started as an unofficial project within Mozilla that soon replaced the Mozilla Suite as the focus of development.
On the matter of forking, the Jargon File says:
It is easy to declare a fork, but can require considerable effort to continue independent development and support. As such, forks without adequate resources can soon become inactive, e.g., GoneME, a fork of GNOME by a former developer, which was soon discontinued despite attracting some publicity. Some well-known forks have enjoyed great success, however, such as the X.Org X11 server, a fork from XFree86 which gained widespread support from developers and users and notably sped up X development.
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 wordprocessor 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 Mac OS X (based on Nextstep and thus BSD), Cedega and CrossOver (proprietary forks of Wine), EnterpriseDB (a fork of PostgreSQL, adding Oracle compatibility features), Fujitsu Supported PostgreSQL with their proprietary ESM storage system, and Netezza's 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.