Git - Github Flashcards

1
Q

Git is a

A

version control system

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

Files in the working directory can have 2 states:

A

tracked and untracked

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

Tracked files can have 3 states:

A

Modified, unmodified and staged

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

Why do we create new branches?

A

for any modifications on the project, adding new features for example

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

Can we create new features directly on main branch?

A

No, we create new branches and merge them to main when sure that there are no bugs

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

Github is a

A

version management web service

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

The command to create a local repository is:

A

git init

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

The commands to push your modifications to github are:

A

git add -> git commit -> git push (remember to push to your branch and not to main branch!)

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

To clone a repository locally, I will use the command:

A

git clone

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

To avoid pushing files with sensitive information, I need to add the file name to:

A

.gitignore file

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

The command to create a new branch is:

A

git branch

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

The command to change branch is:

A

git checkout

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

The command to create and switch to a new branch is:

A

git checkout -b

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

The command to delete a branch is:

A

git branch -D

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

The command to see the history of your repository is:

A

git log

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