Git Flashcards
Version control
system that records changes to a file or set of files over time so that you can recall specific versions later.
VCS allows you to revert files back to a previous state
true
if you screw things up, you can generally recover easily
true
CVCS
centralized version control system have a single server that contains all the versioned files, and a number of clients that check out files from that central place. this has been the standard for version control
DVCS
distributed version control system : clients fully mirror the repository to save work if the server dies
major difference between git and any other VCS
VCS stores information as a list of file. git thinks of its data more like snapshots of mini filesystem. everytime you commit, or save the state of your project in git, it takes a picture of what all your files look like at that moment and stores a reference to that snapshot
if a file has not changed, git doesnt store the file again, just a link to the previous identical file is has already stored
true
git operations are nearly local
you can work and commit on an airplane or without internet connection.
git has integrity
impossible to change content of any file without git knowing about it. you cant lose information in transit or get file corruption without git being able to detect it.
SHA-1 hash
mechanism for checksumming technique in ‘git has integrity’
3 main states your file can reside in
committed, modified, and stagedCommitted means that the data is safely stored in your local database. Modified means that you have changed the file but have not committed it to your database yet. Staged means that you have marked a modified file in its current version to go into your next commit snapshot.
basic git workflow
- modify files in your working directory
- you stage the files, adding snapshots of them to your staging area.
- you do a commit, which takes the file as they are in the staging area and stores that snapshot permanently to your git directory