In the field of
software development,
trunk refers to the unnamed
branch (version) of a file tree under
revision control. The trunk is usually meant to be the base of a project on which development progresses. If developers are working exclusively on the trunk, it always contains the latest
cutting-edge version of the project, but therefore may also be the most unstable version. Another approach is to split a branch off the trunk, implement changes in that branch and merge the changes back into the trunk when the branch has proven to be stable and working. Depending on development mode and
commit policy the trunk may contain the most stable or the least stable or something-in-between version. Other terms for trunk include
baseline, mainline, and
master, though in some cases these are used with similar but distinct senses – see Revision control: Common vocabulary. The trunk is also sometimes loosely referred to as HEAD, but properly head refers not to a branch, but to the most recent commit on a given branch, and both the trunk and each named branch has its own head.