Git Flashcards

1
Q

Modified

A

there’s been changes to the file but it’s not committed yet

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

Staged

A

You have marked a file to go into your next commit snapshot

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

Committed

A

the changes you made have been stored locally

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

workflow

A
  1. Modify the files
  2. Stage the files
  3. Do a commit
  4. Push Up to Github
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

~ git status ~

A

tells you the current state of the project

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

~ git add ~

A

adds a file to now be tracked by git

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

git “staging area”

A

where files are before they get committed to the repository. They can be added or deleted before they get to the repository

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

~git commit~

A

committing the files from the staging area to the repository

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

~git log~

A

lists all the changes that you’ve committed so far

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

~git remote add origin ‘your Github account’~

A

adding a commit to be pushed

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

~git push~

A

push the changes

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

~git pull~

A

pulls any changes done in the main repository to our local repository

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

~git diff~

A

tells you what is different in commit
variations:
1. git diff HEAD: changes in your most recent commit
2. git diff –staged: to see the changes you just staged

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

~git reset ‘file name’~

A

un-stage files

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

~git checkout ‘file name’~

A

files can be changed back to how they were at the last commit

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

branch

A

a copy of the code to make separate commits to

17
Q

~git branch ‘branch name’~

A

create a branch with the git name

18
Q

~git checkout ‘branch name’~

A

to go to that branch name

19
Q

~git branch~

A

see all the branches and see which branch you’r’e in

20
Q

~git rm ‘file name’~

A

removes the file name, you can also you the wildcard

21
Q

~git merge ‘branch name’~

A

merges the branch that you name into the branch that you’re in

22
Q

~git branch -d ‘branch name’~

A

deletes the branch that you name

23
Q

~git push~

A

push your changes into a remote repository