Skip to content

Latest commit

 

History

History
87 lines (57 loc) · 2.45 KB

quiz.md

File metadata and controls

87 lines (57 loc) · 2.45 KB

Git quiz

  1. What is contained in a commit?

  2. What are the 3 areas in Git?

    • Staged
    • It's Complicated
    • Untracked
    • Repo or History
    • Backstage
    • Frozen
    • Working Directory
  3. What commands or actions move a file to different Areas of a repository?

  4. Can a file be staged and modified at the same time? How?

  5. What is the difference between fork and clone?

  6. What are some common log output modifiers and what do they do?

  7. How would you list all merged branches in a git repo?

    • git branch -m
    • git branch --not-not-merged
    • git branch --no-merged
    • git branch --merged
  8. Can you delete an unmerged branch?

    • Yes
    • No
    • Yes but you have to use -D
  9. What is HEAD?

  10. Given a stash with 3 items how would you apply the 2nd item in the stash to your repo?

    • git stash apply the second one
    • git stash pop pop
    • git stash drop pop
    • git stash apply stash@{2}
  11. What tag data is added with an annotated tag?

    • Tag message
    • Tagger
    • Tag Committer
    • Tag Date
    • Tag count
    • Tag Parent
  12. How would you get a count per file of the phrase 'lodash' in a repo?

  13. How would you amend the most recent commit?

  14. Why should you only rebase local commits that have not been shared?

  15. How would you start an interactive rebase

  16. What are some different modifiers in an interactive rebase?

  17. Explain the difference between a recursive merge and a fast-forward merge?

  18. What happens if you run the command 'git reset --hard HEAD'

  19. Command to compare your local changes or differences before pushing your commit(s) to master on the remote

  20. Command to log or show commits in a branch feature1 that are not in the master branch

  21. Command to log or show unique commits in both branch feature1 and the master branch

  22. Command to clean up or delete a merged local branch named feature1

  23. Check areas that would be effected by the following commands

Command Working Directory Staing
git reset file1.txt [ ] [ ]
git reset --hard file1.txt [ ] [ ]
git checkout -- file1.txt [ ] [ ]
git reset file1.txt [ ] [ ]
git reset --hard file1.txt [ ] [ ]
git checkout -- file1.txt [ ] [ ]

Optional: Are there any topics or questions you would like added to the quiz?