ENAUTO Flashcards
What is GIT and how does it work?
Git is an open-source version-controlled management system, that takes snapshots of works known as ‘commits’ and stores them in a database for later reference. Git commits forms a timeline that describes the history of a project.
What is a Version Control System?
Version controlled system maintains a history of changes to files for reference and rollback. This can be placed in two different categories: centralized or distributed.
What is Centralized VCS?
Centralized VCS allows users to check files in and out of a master repository. This means that the operation is only performed on files that have been checked back into the repository.
What is Distributed VCS?
The Distributed VCS allows users full access to every copy of the repository. This allows the users to make any changes to the repository on their local system. When it’s time to bring those changes into production, users can “merge” their local changes back into the master repository.
What is a repository (repo)?
A repository [also known as a vault] is used for storing the version-controlled files and data. Users view the Git repo as a regular folder or directory.
What is the difference between a regular directory and a Git repo?
The main difference between a regular directory and a Git repo is that the Git repo has a hidden .git/ subdirectory. This directory is where Git stores the committed version-controlled files and other repo data.
What is a working directory?
A working directory is a visible directory to the user when working from a computer with the repo.
What are versioned files?
Versioned files are files tracked by Git.
What are unversioned files?
Unversioned files are files that exist in the working directory but are not tracked by Git.
In Git, what does the ‘commit’ feature do?
The commit feature is a snapshot in time of your version-controlled files. Once committed, these changes are essentially locked into the repository.
In Git, what are ‘branches.’
The branch feature within Git allows for parallel versions of the same repository to exist at the same time.
In Git, what is the ‘master branch?’
The master branch within Git is the first branch created in a project.
In Git, what is the ‘head point?’
The head point is where the next commit will be placed within a given branch. Each new branch will have a new head, where new commits can be placed. Where the head is and what changes have been performed on various branches.
What happens during a commit?
When a commit is performed to files that are version controlled, Git will store full copies of all the changed files. It also stores a tree which contains a link to all changed files and previously commits unchanged file within the current commit. Git then computes a hash of the stored files, and uses the hash to uniquely refer to individual commits. These hashes are used to detect changes and ensure that files retrieved from the repository are exactly the same as they were when committed.
What does the command ‘git config –global user.name “user name”’ do?
This command will set the username for the user within the Git configuration.