Definitions Flashcards
Version Control (VCS)
Records changes to a file, a set of files, or a program over time as a version. While allowing you to revert back to previous states.
Centerlized Version Control Systems (CVCSs)
A single server that contains all versioned files from a single place.
Distributed Version Control Systems (DVCSs)
Collaborative data sharing that allows each peer’s working copy of the codebase complete repository.
Three Git States
- Committed: stored in local database
- Modified: changed a file but not yet committed
- Staged: marked a modified file in its current version to go into your next commit
Three Sections of a Git project workflow
- [HEAD] Git directory: is where Git stores the metadata and object database for your project. Points to the last commit you’ve made.
- Working directory: one version of the project, which holds actual files
- [Index] stores information about what will go into your next commit.
Two approaches to getting a Git Repository
- Import an existing project into git
2. Clones an existing project in Git
git clone
Clone a repository into a new directory
Initial commit
Start version-controlling existing files (as opposed to an empty directory)
Two main states of a git file or directory
- untracked files: Git doesn’t see any files in your working directory
- unmodified : completed/commited/cloned version <br></br>
modified: changed since your last commit <br></br>
staged: “Changes to be committed” heading
- unmodified : completed/commited/cloned version <br></br>
Remote repositories
Versions of your project that are hosted on the Internet or network somewhere.
Two Types of Tags
- Lightweight
2. Annotated
Lightweight Tag
A immutable reference to a specific commit with a descriptive label.
Annotated Tag
A immutable reference to a specific commit with a descriptive label. That may include release notes, the meta-information about the release, and optionally a signature to verify the authenticity of the commit to which it points.
Branches
Mutable references
Sharing Tags Default
By default, the git push command doesn’t transfer tags to remote servers. <br></br> $ git push origin v1.5