Introduction to Git Module #41 Flashcards

1
Q

How do we add files into the staging area of GIT?

A

git add filename.xxx

When adding multiple files, there is no need for any kind of delineation just list the files.

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

How would you remove a file from staging?

A

git reset filename.xxx

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

What does this command do git commit git commit -a -m

A

This commits all changes and cleans up the staging area. Note, this is using two flags which is a correction to Flavio’s content.

The -a flag commits all of the updated files the -m flag is to create a message/comment which is necessary for the commit.

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

How can you get info on the status of GIT?

A

git status

Provides that status of tracked and un-tracked files

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

What if you want to get information about all of the committs made, by whom and what branches were affected?

A

git log

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

How are new branches created?

A

git checkout -b name

you can name the branch whatever you want but it has to have a name in the example above name is the name.

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

What is the command to see all branches?

A

git branch

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

What does push do? What’s the command?

A

Sends changes to the server.

git push origin master

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

What does pull do? What’s the command?

A

Pulls changes from the server made by others.

git pull origin master

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

What’s the command for cloning a remote repo on Github?

A

git remote add origin https://github.com/YOU/REPONAME.git

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