Domain 1: Intro to GitHub - Deck 2 Flashcards
The ___ tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.
-u
git push -u origin master
We can check for changes on our GitHub repository and pull down any new changes by running:
git ___ ____ ______
git pull origin master
Files can be changed back to how they were at the last commit by using the command:
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>
When developers are working on a feature or bug they’ll often create a copy aka _______
branch
Is a free and open-source code management and version control system.
Git
This is located on your computer and has all the files and their commit history.
local repository
This is not located on your computer, it is typically shared by the team you work on and is hosted on a server.
remote repository
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’
d
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’
d
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
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
d
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
c
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
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
b
What is the correct command to commit staged files?
a. git commit
b. git comment
c. git lockdown
d. git push
a