Intro to Version Control Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Version Control?

A

A system that records changes to a file or set of files over time so that you can recall specific versions later.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does “git init” in the terminal do?

A

Creates a .git file that tracks all your changes, commit your changes, and perform version control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a “Staging Area” in the terminal?

A

An intermediate place where you can pick and choose which files inside your working directory that you want to commit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you check what’s in your terminal’s staging area?

A

“git status” command. It shows you untracked files which are shown in red.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you start tracking untracked files in the terminal?

A

“git add” command + file name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you record changes to the repository?

A

“git commit” command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you add a message with your git commit?

A

-m “_____” command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a software repository?

A

aka “repo”. A storage location from which software packages may be retrieved and installed on a computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the command to check what git commits you’ve made?

A

“git log” command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the command to add any untracked files in a folder to the staging area where they can be tracked?

A

“git add .”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the “Working Directory”?

A

The folder or the directory where you initialize your git repository.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the “Staging Area”?

A

A place to try and figure out what are the files you want to ignore or get tracked.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What command do we use to push a file from the working directory to the staging area(terminal)?

A

“git add”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the three stages in the terminal to commit a file?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the terminal command to revert back to the last repository?

A

“git checkout” command

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the terminal command to check the difference between the changes of the same file?

A

“git diff” command

17
Q

What is the difference between making local repositories and remote repositories?

A

Local repositories is controlling and saving file versions locally on your computer whereas remote repositories is hosting your files and version controls on somebody else’s server or computer.

18
Q

How do you push your local repository to a remote repository?

A

“git remote add origin locationlink/file” command

19
Q

How do you push your local repository to a remote repository?

A

“git remote add origin(this can be named whatever you like) locationlink/file” command