Git Flashcards

1
Q

What is Git?

A

A fast and modern implementation of version control system

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

What does git provide?

A

A history of content changes
A collaborative changes to files

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

What does [git status] do?

A

It shows you the status of your files and directories and which stage they are in. Displayed in red. (Not staged, staging area, and committed)

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

What does [git add <file>] do?</file>

A

It adds your file to the staging area and changes it color to green. (Not staged, staging area, and committed)

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

What does [git commit -m “Add <file>”] do?</file>

A

This commits the file to git.
(Not staged, staging area, and committed)

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

What does [git log] do?

A

Shows the history of ur git actions.

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

What does [git commit -m “Edit file and file”]?

A

This commits the file and adds a description to git.
(Not staged, staging area, and committed)

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

What does [git push] do?

A

Lets you upload your work to the GitHub repository.

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

What does [git clone git@github.com:USER-NAME~]

A

Posts the GitHub repo to git in ur shell

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

How to delete a branch in git?

A

Checkout then use [ git branch -d (branch name) ]

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

How to checkout to a branch in git?

A

[ git checkout (branch name) ]

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

How to change the origin of your repository with git?

A

[ git remote -v set-url origin …]

Copy for example the ssh link there.

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