GIT - Coursera - IBM Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

create a new local repository

A

git init

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

create and add a file to the repo

A

git add

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

commit changes

A

git commit

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

create a branch

A

git branch

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

switch to a branch

A

git checkout

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

check the status of files changed

A

git status

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

review recent commits

A

git log

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

revert changes

A

git revert

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

get a list of branches and active branch

A

git branch

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

merge changes in your active branch into another branch

A

git merge

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

What is stored on the master or main branch?

Files which contain documentation only
The original, unchanged version of the code
The deployable version of the project code
All the project files, including files from forks

A

The deployable version of the project code

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

Which Git command transfers changes from your local repository to the remote repository?

git-pull
git-push
git-fetch
git-remote

A

git-push

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

When would you fork a project?

To create a backup of the master branch of the project
To give a new user permissions to the project
To use an existing repository as the base for a new project
To add a branch to an existing tree in the project

A

To use an existing repository as the base for a new project

Forking allows you to modify or extend a repository without affecting the original repository. Frequently, developers use forking to take an existing repository and make it the starting point for your new project.

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

Which GitHub developer command prepares an email submission in a form appropriate for a Linux kernel-style public workflow?

git-send-email
git-request-email
git-format-patch
git-request-pull

A

git-format-patch

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

Which Git command can a repository administrator use to allow anonymous downloads from the repository?

git-shell
git-remote
git-daemon
git-am

A

git-daemon

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

What happens if you make a change on a repository branch that you don’t own?

GitHub generates an error message.
GitHub undoes the changes.
GitHub makes a pull request.
GitHub issues a push request for the owner.

A

GitHub makes a pull request.

GitHub automatically makes a pull request on your behalf if you make a change on a repository branch that you do not own.

17
Q

You need to run three commands to push local changes to the GitHub repository. What is the third command?

git-remove -v
git-push
git-add
git-commit -m

A

git-push

18
Q

What are three commonly used commands for working with remote repositories?

open, edit, push
push, pull, fetch
open, close, send
create, delete, copy

A

push, pull, fetch

19
Q

When managing forks, which command can you use to fetch and merge the remote branch in a single step?

git-fetch upstream
git-merge upstream/master
git-pull downstream
git-pull upstream

A

git-pull upstream

When managing forks, you can use the git-pull upstream command to fetch and merge the remote branch in a single step.

20
Q

Which command can a repository administrator use to allow anonymous downloads from repositories?

git-shell
git-am
git-daemon
git-rerere

A

git-daemon