giiiiit Flashcards

1
Q

Write git command to find the version

A

git –version

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

What is Git? Why use git?

A

A version control system.
Track changes, see who make changes and help you collab with your teammates

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

How do you know let know git who you are?

A

git config –global user.email “attract6figures@chase.com”

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

How to initialize git

A

git init

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

how to check the status of git

A

git status

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

What is (M)
M index.html
A hello.txt
?? bibgo.txt
D hello.feature

A

Means modified
Files added to stage
?? untracked files
D deleted files

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

How to get the git log?

A

to find the history of commits, you do git log

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

how to ask for help using git?

A

git help –all

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

how to get help for a specific help?

A

git commit -help

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

Why create a new branch?

A

we do not want to disturb or possibly wreck the main project

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

pull is a combination of:

A

fetch and merge

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

How do you get all the change history of the origin for this branch:

A

git fetch origin

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

How to Update the current branch from its origin using a single command:

A

git pull origin

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

Remove the hello-you branch from the local repository

A

git branch -d hello-you

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

Merge the hello-you branch with the current branch:

A

git merge hello-you

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

Get all the change history of the origin for this branch:

A

git fetch origin

17
Q

In .gitignore add a line to ignore all .temp files:

A

*.temp

18
Q

In .gitignore add a line to ignore all files in any directory named temp:

A

/temp

19
Q

In .gitignore add a single line to ignore all files named temp1.log, temp2.log, and temp3.log:

A

temp?.log

20
Q

In .gitignore, ignore all .log files, except main.log:

A

*.log !main.log