Git Flashcards

1
Q

Initialize new repository

A

git init

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

Get a copy of a repository from github etc..

A

fork and copy link.

git clone

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

create a new branch and switch to it

A

git checkout -b “new branch name”

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

List recent changes

A

git log

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

Check for changed files

A

git status

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

Stage files

A

git add .

git add “filename”

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

commit files with message

A

git commit -m “message”

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

push to remote repository

A

git push origin master

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

Switch to other branch

A

git checkout “branchname”

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