This is a draft cheat sheet. It is a work in progress and is not finished yet.
Centralized Version Control Systems - p. 11
Single server contains all versioned files |
Several clients check out from central server |
Centralized server represents single point of failure |
Distributed Version Control Systems - p. 12
Clients don't just check out the latest snapshot of the files |
Every clone is really a full backup of all the data. |
What is Git - p. 14
Snapshots |
takes picture of what all files look like when commiting and stores a reference to that snapshot |
|
If files have not changed, only the previously saved file is linked |
Local Operations |
operations only need local files and resources |
|
entire history of the project on local disk |
|
work can be continued when offline |
Integrity |
files are checksummed and then referred to by that checksum |
|
SHA-1 hash is used for checksumming |
SHA-1 hash |
40-character string composed of hexadecimal characters |
|
calculated based on the contents of a file or directory |
|
everything in Git database saved by hash value of its contents |
Adding data |
actions only add data to database |
|
once committed data loss is very difficult |
The three states of files - p. 16
Modified |
file changed but not committed to database yet |
Staged |
modified file is marked to go into next commit snapshot |
Committed |
data is safely stored in local database |
Main Sections of a git project - p. 17
Working tree |
single checkout of one project version |
Staging area |
file with information about next commit |
Repository |
metadata and object database |
|
|
Installing Git - p. 18
Most official build for Windows is available for download on the Git website |
Git for Windows is separate from Git itself |
git config - p. 21
get and set configuration variables that control all aspects of how Git looks and operates |
global config file |
values applied to every user on the system and all their repositories |
|
git config --system |
user config file |
values specific to user |
|
git config --global |
local config file |
file of current repository |
|
git config --local |
When looking for a configuration value, Git will start at the local level and bubble up to the system level. |
View settings |
git config --list --show-origin |
First Time Setup - p. 22
name |
git config --global user.name "John Doe" |
email |
|
editor |
git config --global core.editor emacs |
branch name |
git config --global init.defaultBranch main |
settings |
git config --list |
specific values |
e.g. git config user.name |
Git might read same configuration variables value from more than one file. Having unexpected values is possible. |
Getting Help - p- 24
git help <verb> |
command for seeing manpage |
git <verb> --help |
equivalent command |
git <verb> -h |
overview of available options for git commands |
|
|
|