Git & Github Quiz

21 Questions | Total Attempts: 1510

SettingsSettingsSettings
Please wait...
Git & Github Quiz

This is an MCQ quiz to test the basics and essentials of git & GitHub. Made by: Enigma Team


Questions and Answers
  • 1. 
    Which of these terms best describes git?
    • A. 

      Integrated Development Environment

    • B. 

      Distributed Version Control System

    • C. 

      Issue Tracking System

    • D. 

      Web-Based Repository Hosting Service 

  • 2. 
    Who is attributed with inventing git?
    • A. 

      Junio C. Hamano

    • B. 

      James Gosling

    • C. 

      Kohsuka Kawaguchi

    • D. 

      Linus Torvalds

  • 3. 
    Which of these terms best describes GitHub?
    • A. 

      Integrated Development Environment

    • B. 

      Distributed Version Control System

    • C. 

      Issue Tracking System

    • D. 

      Web-Based Repository Hosting Service

  • 4. 
    Which command should you use to initialize a new git repository?
    • A. 

      Git bash

    • B. 

      Git install

    • C. 

      Git init

    • D. 

      Git start

  • 5. 
    What is the opposite of git clone?
    • A. 

      Git push

    • B. 

      Git add

    • C. 

      Git upload

    • D. 

      Git status

  • 6. 
    What command do you run to view the commit history of your repository?
    • A. 

      Git history

    • B. 

      Git log

    • C. 

      Git commit -h

    • D. 

      Git past

  • 7. 
    How do you check the state of your local git repository since your last commit?
    • A. 

      Git check

    • B. 

      Git status

    • C. 

      Git commit

    • D. 

      Git diff

  • 8. 
    What's a shortcut to staging all the changes you have?
    • A. 

      Git commit add .

    • B. 

      Git commit .

    • C. 

      Git add .

    • D. 

      Git stage -a

  • 9. 
    How do you supply a commit message to a commit?
    • A. 

      Git message "I'm coding!"

    • B. 

      Git add "I'm coding!"

    • C. 

      Git commit "I'm coding!"

    • D. 

      Git commit -m "I'm coding!"

  • 10. 
    To get the lastest changes from your remote repository, the git command is?
    • A. 

      Git refresh

    • B. 

      Git pull down

    • C. 

      Git pull origin master

    • D. 

      Git reset

  • 11. 
    To make a new git branch, the git command is?
    • A. 

      Git branch

    • B. 

      Git -b

    • C. 

      Git new branch

    • D. 

      Git checkout branch

  • 12. 
    After you initialize a new git repository and create a file named git-quiz.html, which of the following commands will not work if issued?
    • A. 

      Git add git-quiz.html

    • B. 

      Git status

    • C. 

      Git add .

    • D. 

      Git commit -m "git quiz web file added"

  • 13. 
    What's the git command that downloads your repository from GitHub to your computer?
    • A. 

      Git push

    • B. 

      Git fork

    • C. 

      Git clone

    • D. 

      Git commit

  • 14. 
    Assuming a remote reposistory at https://github.com/myawesomegitname/my_repo.git, how would you add the remote repository to your local git?
    • 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

  • 15. 
    Which is the correct usage of push command?
    • A. 

      Git push <remote> <branch>

    • B. 

      Git push <branch> <remote>

    • C. 

      Both correct

    • D. 

      None of them

  • 16. 
    Which is the correct order to submit your changes from the working directory all the way to the remote repository?
    • A. 

      Git add, git commit, git push

    • B. 

      Git add, git push, git commit

    • C. 

      Git commit, git add, git push

    • D. 

      Git push, git add, git commit

  • 17. 
    Which of the following commands show changes between commits?
    • A. 

      Git commit

    • B. 

      Git reset

    • C. 

      Git diff

    • D. 

      Git show

  • 18. 
    Which of the following commands join two or more development histories together?
    • A. 

      Git merge

    • B. 

      Git concat

    • C. 

      Git join

    • D. 

      Git branch

  • 19. 
    Which of the following commands is used in switching between branches?
    • A. 

      Git branch

    • B. 

      Git checkout

    • C. 

      Git switch

    • D. 

      Git merge

  • 20. 
    Which of the following commands is used to reset current HEAD to the specified state?
    • A. 

      Git reset

    • B. 

      Git restore

    • C. 

      Git checkout

    • D. 

      Git diff

Back to Top Back to top