Domain 1: Intro to GitHub - Deck 2 Flashcards

1
Q

The ___ tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.

A

-u
git push -u origin master

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

We can check for changes on our GitHub repository and pull down any new changes by running:

git ___ ____ ______

A

git pull origin master

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

Files can be changed back to how they were at the last commit by using the command:

A

git checkout –<target>
The git checkout command lets you navigate between the branches created by git branch. Checking out a branch updates the files in the working directory to match the version stored in that branch, and it tells Git to record all new commits on that branch. Think of it as a way to select which line of development you’re working on.</target>

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

When developers are working on a feature or bug they’ll often create a copy aka _______

A

branch

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

Is a free and open-source code management and version control system.

A

Git

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

This is located on your computer and has all the files and their commit history.

A

local repository

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

This is not located on your computer, it is typically shared by the team you work on and is hosted on a server.

A

remote repository

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

When do we need to append a message while using git?

a. While staging: git add -m ‘adding files ______’

b. While adding a remote: git remote add -m ‘adding github’

c. While initializing a repo: git init -m ‘initial commit’

d. While committing: git commit -m ‘initial commit’

A

d

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

What is the correct command to check the current git status?

a. While staging: git add -m ‘adding files ______’

b. While adding a remote: git remote add -m ‘adding github’

c. While initializing a repo: git init -m ‘initial commit’

d. While committing: git commit -m ‘initial commit’

A

d

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

To stage only files with a .txt extension, the command is?

a. git add *.txt

b. git add *.text

c. git add -a .txt

d. git add - *.txt

A

a

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

Assuming a remote repository at https://github.com/ myawesomegitname/my_repo.git, how would you add the remote repository to your local repository?

a. git remote origin add https://github.com/myawesomegitname/my_repo.git

b git remote new origin https://github.com/myawesomegitname/my_repo.git

c. git remote add https://github.com/myawesomegitname/my_repo.git

d. git remote add origin https://github.com/myawesomegitname/my_repo.git

A

d

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

To get the latest changes from your remote repository, the git command is?

a. git refresh

b. git pull down

c. git pull origin master

d. git reset

A

c

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

What is the correct command to initialize a new git repository?

a. git branch

b. git -b

c. git new branch

d. git checkout branch

A

a

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

What is the correct command to stage a new file or add file changes to stage?

a. git stage

b. git add <new-filename></new-filename>

c. git <new-filename></new-filename>

d. There is no stage

A

b

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

What is the correct command to commit staged files?

a. git commit

b. git comment

c. git lockdown

d. git push

A

a

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

What is the correct command to check the current git status?

a. git status

b. git log

c. gs

d. git push

A

a

17
Q

Git is a distributed version control system that allows for the ______ of changes in a project.

A

tracking

18
Q

Each project lives within a ________.

A

repository

19
Q

Repositories are _____, meaning all developers have a copy of the repository which can hold the history of every change made to the project.

A

distributed

20
Q

_____ is a Git repository hosting platform with added functionalities that makes collaboration between multiple developers more efficient.

A

GitHub