GIT - Coursera - IBM Flashcards
create a new local repository
git init
create and add a file to the repo
git add
commit changes
git commit
create a branch
git branch
switch to a branch
git checkout
check the status of files changed
git status
review recent commits
git log
revert changes
git revert
get a list of branches and active branch
git branch
merge changes in your active branch into another branch
git merge
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
The deployable version of the project code
Which Git command transfers changes from your local repository to the remote repository?
git-pull
git-push
git-fetch
git-remote
git-push
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
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.
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
git-format-patch
Which Git command can a repository administrator use to allow anonymous downloads from the repository?
git-shell
git-remote
git-daemon
git-am
git-daemon
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.
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.
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
git-push
What are three commonly used commands for working with remote repositories?
open, edit, push
push, pull, fetch
open, close, send
create, delete, copy
push, pull, fetch
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
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.
Which command can a repository administrator use to allow anonymous downloads from repositories?
git-shell
git-am
git-daemon
git-rerere
git-daemon