Skip to content

Instantly share code, notes, and snippets.

@Ingelheim
Last active July 1, 2016 12:35
Show Gist options
  • Save Ingelheim/5ea3dba8895348d06326ed2bef4ee077 to your computer and use it in GitHub Desktop.
Save Ingelheim/5ea3dba8895348d06326ed2bef4ee077 to your computer and use it in GitHub Desktop.
  1. What command would you run, along with any arguments, to set your name so it shows up in git commits?

  2. What command would you run, along with any arguments, to show the differences in files that are staged from files that are already committed to the repository?

  3. What command, along with any arguments, is the shortcut to create a branch and checkout that branch at the same time?

  4. What command would you run, along with any arguments, to get code from the remote repository in order to retrieve and merge it in one step?

  5. What command would you run, along with any arguments, to show all the information available about the remote repository?

  6. While currently in your local master branch, what command would you run, along with any arguments, to place the changes you've made to your local master branch on top of the changes in the remote master branch?

  7. What command would you run, along with any arguments, to show the differences between 2 branches?

  8. What do you think happens if you run git init in your user directory?

  9. What's the difference between staged code and committed code?

  10. How do you add all files with the same extension to the staging area?

  11. What command do you need to use to undo the last commit and all changes it made?

  12. How would you clone a repo down and give the folder a name instead of using the repo's name?

  13. If you receive an error stating that your branch is behind origin, what would you need to do to sucessfully push your changes? (assuming no conflicts)

  14. What command do you use to get the branches in a remote branch?

  15. If you get a conflict in the middle of a rebase and decide you want to cancel the rebase, what command would you run?

  16. To improve log readability, what command would you enter to get your log to show commit info on one line?

  17. You are about to start a new freature, what should you do in the git context?

  18. What should you think about when you are resolving merge conflicts?

  19. When might you use a tag?

  20. How do you alias a git command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment