Intro to Version Control Flashcards
What is Version Control?
A system that records changes to a file or set of files over time so that you can recall specific versions later.
What does “git init” in the terminal do?
Creates a .git file that tracks all your changes, commit your changes, and perform version control.
What is a “Staging Area” in the terminal?
An intermediate place where you can pick and choose which files inside your working directory that you want to commit.
How do you check what’s in your terminal’s staging area?
“git status” command. It shows you untracked files which are shown in red.
How do you start tracking untracked files in the terminal?
“git add” command + file name.
How do you record changes to the repository?
“git commit” command
How do you add a message with your git commit?
-m “_____” command
What is a software repository?
aka “repo”. A storage location from which software packages may be retrieved and installed on a computer.
What is the command to check what git commits you’ve made?
“git log” command
What is the command to add any untracked files in a folder to the staging area where they can be tracked?
“git add .”
What is the “Working Directory”?
The folder or the directory where you initialize your git repository.
What is the “Staging Area”?
A place to try and figure out what are the files you want to ignore or get tracked.
What command do we use to push a file from the working directory to the staging area(terminal)?
“git add”
What are the three stages in the terminal to commit a file?
Step 1: Create in Working Directory
Step 2: Push it to the Staging Area to track or ignore.
Step 3: Commit it into the Local Repository
What is the terminal command to revert back to the last repository?
“git checkout” command