Module Quiz: Working with Git

Module Quiz: Working with Git

  1. The git add command will add files and changes to the staged area.

    • True

    • False

  2. What git command will show you the current state of the local working directory?

    • git pull

    • git clone

    • git status

  3. What command do you use to upload changes to a remote repository?

    • git commit

    • git push

    • git clone

  4. The git diff command will show the revision history of a repository.

    • True

    • False

  5. Which command is used to download the latest changes from a remote repository?

    • git pull

    • git push

  6. You want to create a new branch named “feature”. Which of the following commands can you use?

    • git clone feature

    • git checkout -b feature

    • git branch feature

  7. You’re working on a clothing store application and run the git diff command on your local repository. It outputs the lines below. Which clothing item was removed as part of these changes?

     @@ -4,8 +4,8 @@
      * Hat
     -* Shoes
     +* Dress
      * Watch
    
    • Hat

    • Watch

    • Dress

    • Shoes

  8. What git command shows who made changes to each line in a specific file?

    • git blame

    • git diff

    • git log

    • git clone