GIT & GITHUB Flashcards

1
Q

How to set up a new project

A

git init

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

How to stash changes

A

git stash

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

How to get stash , then remove stash

A

git stash pop

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

how to get stash, keep stash

A

git stash apply

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

list stash

A

git stash list

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

get stash

A

git stash@{n} or git stash pop n

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

remove a stash from list

A

git stash drop@{n}

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

move to a commit using ref

A

git checkout

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

move to a commit refrencing head

A

git checkout Head~n

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

switch to last commit

A

git switch -

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

remove changes to a file

A

git checkout Head

or

git restore

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

how to unstage a file

A

git resore –staged

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

Revert commit without changing files

A

Git reset

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

Revert commit with chaginging files

A

git reset–hard

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

Revert commit in collobaration

A

git revert

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