Movatterモバイル変換


[0]ホーム

URL:


The Fandom Coders Encyclopædia

Git

Version control system

Git is a branchingversion control system based in thefile system and operated via thecommand line (althoughgraphical user interfaces exist).The core concept of Git is that of thecommit, which bundles a set of changes (known as adiff) alongside a message, timestamp, and other metadata.By replaying a set of commits, a computer is able to recreate a list of changes to a file over time.

§ Core Concepts

A Gittree is a representation of a directory of files; each commit represents a tree at a certain point in time.Most commits record changes in relation to a previous “parent” tree; commits which have no parent are known asroot commits.Commits are identified by a SHA‐1hash, and may additionally betagged with a human‐readable name.

Abranch, like a tag, is simply a human‐readable pointer to a commit.Unlike tags, branches are often updated when new commits are made.

Theindex or “staging area” is a temporary list of changes which will form the diff of the next commit.The index often does not match theworking tree, which is the files as they exist in your filesystem.This separation allows users to selectivelystage orunstage files from being committed, sometimes on a line‐by‐line basis, so that a large number of changes can easily be broken up into a number of smaller commits.

Two or more parent commits can be combined through amerge commit.Git features a number ofmerge strategies for automaticallyresolving merges by walking the list of parent commits and comparing changes; however, sometimes manual intervention is necessary.

Git is able to push and pull commits, branches, and tags from a remote server, often simply called aremote.Because a list of commits provides everything needed to replay a set of changes on a different machine, this allows for distributed, collaborative workflows.


[8]ページ先頭

©2009-2025 Movatter.jp