GIT Flashcards

1
Q

What is GIT workflow?

A

its the staging area where we upload or add the files to commit it in the future, also we are able to review them there.

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

what is the “clone” command

A

Clone command is a command to bring a repository that is hosted in a place like Githubu to the local machine

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

what is the “add” command

A

It tracks the files and changes it

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

What is the “commit” command

A

This command saves the files as well as the changes which are made in git

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

what is the “push” command

A

uploads the commits which we have made to a remote repo such as GitHub

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

what is the “pull” command

A

this command downloads the changes from a repo which is established remotely to the local machine

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

what is the”status” command

A

shows all the files updated, changed and new files which arent committed yet.

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

what is the “git add .” command

A

this command adds all the files which are new and also mofidied

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

what is the “git commit -m” command

A

this command is used for committing and leaving a message, the message comes after the -m inside “ “

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

what is a git SSH Key

A

SSH key is an access credential for an SSH protocol, it’s needed for remote communication between machines.

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

what’s the Githib workflow

A

Write code - Commit changes - make pull request

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

what’s the local Github workflow

A

write code - git add - git commit - git push - pull request

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

whats git branching

A

git branching is when we have a main program and if we plan on adding a new feature we are able to make a separate branch where all the commits for the features will be separated from the main branch where the main program is being committed.

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

how to delete a branch

A

git branch -d BRANCHNAME

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

what is git merge

A

git merge is something used when there are other branches than the master branch and when we need the master branch and the separated branch to join together we can use git merge.

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

what is “git checkout -b BRANCHNAME”

A

this command is used for creating a new branch from the master branch

17
Q

what is “git checkout”

A

Git checkout is a command used for checking the branches of an commit and also to check which branch we are currently in.

18
Q

what else can git checkout be used for

A

git checkout can be used for changing the branch we are currently at by using the command (git checkout BRANCHNAME)

19
Q

whats git diff

A

git diff shows the changes of two versions of files

20
Q

git reset

A

git reset can be used to undo an git add (stagging)

21
Q

how to undo a commit

A

we can use the command “git rest HEAD~1” this will reset the commit we have done earlier, HEAD is used to represent the top of the commits meaning the last commit.
HEAD~1 means the commit before the last.

22
Q

conventional commits

A

its a method of writing the commit message when we are committing something,
this includes
Commit type
Commit Scope
Description