In
version control systems, a repository is a data structure that stores
metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
for a set of files or
directory structure. Depending on whether the version control system in use is distributed, like
Git or
Mercurial, or centralized, like
Subversion
Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to sabotage the established social order and its structures of Power (philosophy), power, authority, tradition, h ...
,
CVS, or
Perforce, the whole set of information in the repository may be duplicated on every user's system or may be maintained on a single
server.
Some of the metadata that a repository contains includes, among other things, a historical record of changes in the repository, a set of commit objects, and a set of references to commit objects, called ''heads''.
The main purpose of a repository is to store a set of files, as well as the history of changes made to those files. Exactly how each version control system handles storing those changes, however, differs greatly. For instance, Subversion in the past relied on a database instance but has since moved to storing its changes directly on the filesystem. These differences in storage techniques have generally led to diverse uses of version control by different groups, depending on their needs.
Overview
In software engineering, a
version control system is used to keep track of versions of a set of files, usually to allow multiple developers to collaborate on a project. The repository keeps track of the files in the project, which is represented as a
graph.
A
distributed version control system is made up of
central and branch repositories. A central repository exists on the server. To make changes to it, a developer first works on a branch repository, and proceeds to commit the change to the former.
Forges
A
code forge is a web interface to a version control system. A user can commonly browse repositories and their constituent files on the page itself.
Static web hosting
While forges are mainly used to perform version control operations, some forges allow users to host
static web pages by uploading its source code (such as
HTML
Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
and
JavaScript
JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior.
Web browsers have ...
, but not
PHP) to a repository. This is usually done in order to provide documentation or a
landing page for a software project.
The use of repositories as a place to upload web documents allows version control to be integrated, and additionally allows quick iteration because changes are pushed through the Version Control System instead of having to upload the file through a protocol like
FTP
The File Transfer Protocol (FTP) is a standard communication protocol used for the transfer of computer files from a server to a client on a computer network. FTP is built on a client–server model architecture using separate control and dat ...
.
Examples of this kind of service include
GitHub Pages and
GitLab Pages.
See also
*
Sandbox (software development)
*
Software repository
A software repository, or repo for short, is a storage location for Package format, software packages. Often a table of contents is also stored, along with metadata. A software repository is typically managed by source or version control, or rep ...
*
Codebase
*
Git
*
Forge (software)
*
Comparison of source-code-hosting facilities
References
{{Version control software
Version control