CATLISM, 123-126
Git 101: the basics1CATLISM, 123-126
#
As one of the “most widely adopted distributed open source solution for keeping track of changes to files […] git
works by creating an environment that retains details of each change made to the fles being tracked, allowing one or more users to have a complete log of the edits made to the data throughout time by the
users acting upon it.”2CATLISM, 123
. Installation files and instructions can be found on git
official website and official documentation [Chacon and Straub, 2022] respectively.
Figure 4.4 graphically summarises the basic operations, exemplified through the actual commands further below.
Initiate git
in a local folder#
git init
[c4.06]
Clone a remote repository#
git clone https://github.com/catlism/catlism.github.io.git
[c4.07]
Add all changes (even from previously untracked files) to the local git
database (i.e. stage
the changes)#
git add -A
Record (commit
) all changes, along with a textual description of what has been changed#
git commit -m "Description of the changes"
Send (push
) all changes to the remote repository#
git push
Obtain (fetch
) all changes from the remote repository#
git fetch
Include/apply (fetch
) all changes from the remote repository to the local repository#
git merge
Obtain and include/apply (pull
) all changes from the remote repository to the local repository#
git pull