Git Flashcards
Learn how to use git
What is VCS
A Version Control System is a tool to manage changes over time to some files.
What differences exist between a DVCS and a CVCS
A Centralized Version Control System has a central server to handle most operations like retrieving history, committing and merging, meanwhile Distributed ones, make those operations locally since it has entire snapshots in local clones.
Differences between deltas and snapshots
Deltas storage the difference between versions while snapshots storage the entire file for each version (not the entire project).
What is a checksum
A value calculated from some data with a specific algorithm to validate that the data was not corrupted or changed while it was being transmitted.
The three states of files in Git
Modified, Staged, Committed
The three areas of Git
Working three, staging area or index, .git directory
What is git config
A command that helps us to get and set configuration at different levels by reading and writing to specific text files
Where are located the config files of git
[path]/etc/.gitconfig (system level, normally needs admin privileges)
~/.gitconfig or ~/.config/git/config (user level, set with –global flag)
./.git/config (repository level, default or with –local option)
In windows there is a system config at C://ProgramData/Git/config (git -f)
What is the output of git config –list
All configuration resolved for git at the current directory, it can contain duplicated keys.
What is the output of git config –list –show-origin
The show origin flag makes the output show form where the config is being red.
Which command in unix can change the editor to emacs at user level
git config –global core.editor emacs
When setting the editor in windows, what considerations are needed
We need to specify the absolute path to the executable
Is glob patterns unified across different tools?
Actually no, there are different rules , git follows the standard glob rules from UNIX original tool and some extra rules and it works stable in different OS.
In what status can a file be in Git
Untracked
Unmodified
Modified
Staged
What command is used to track, and stage files?
git add <options> <glob></glob></options>