Test your basic Git skills and knowledge
##git features True or False:
- git is centralized, so you must have a connection to your remote repository in order to look at previous commits
- git uses "branches" to allow for and manage diverging code
- git supports merging of branches
- git keeps a history of commits and commit authors
##Cloning a Repository
- You have a repository that resides at https://github.com/awesome/my-awesome.git. Clone it to your machine.
- You have a repo at https://github.com/awesome/great-project.git. Clone it to a folder called "great" that resides in the same folder you are currently working in.
##git Commands Which command would you use to check the current state of your local repository (see things like staged/not staged changes, how many commits you are ahead or behind, etc.)?
Which command do you use to stage (not commit) changes in your code?
Which command allows you to commit changes and specify a commit message in the same command?
You cloned a repository from a co-worker, but later on he made some changes to that repository. Which command would allow you to get those changes in your local repository?
You've finished your code and want to have the rest of your team update in order to see it. Which command would you use to send the changes to everyone?
(Cont'd) Which command would each team member need in order to see the updated code?
##Git vs Github Which are correct differences between Git and GitHub?
- GitHub allows you to pull changes from a remote repository, git does not
- git doesn't include "Pull Request" functionality, GitHub does
- git doesn't include the "fork" functionality, GitHub does
- Github allows hosting of git repositories, git itself does not provide hosting
When would you fork a GitHub repository?
- If you wish to eventually merge your changes back into the original repository
- If you want to keep your local repository's original location the same as the original repo you forked from
- If you want to pull in changes from the original repository
- All of the above
- None of the above
Which are correct differences between "cloning" and "forking" a repository?
- A clone allows you to work (pull, push) on code without disrupting the original repo.
- When you fork the repository, it retains a reference to the original repository for pulling in "upstream" changes.
- Cloning the repository doesn't place the repository on your machine, it only "clones" it to your own GitHub account.
- All of the above
- None of the above
© DevMountain LLC, 2016. Unauthorized use and/or duplication of this material without express and written permission from DevMountain, LLC is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to DevMountain with appropriate and specific direction to the original content.