GitHub for Developers Quiz Questions and Answers

Which command is used to show limited number of commits?

Answer :
  • git log -n

Which command defines the author email to be used for all commits by the current user?

Answer :
  • git config --global user.email

____________ git command is used for getting a high-level overview of the project history.

Answer :
  • git log --oneline

The Git clone command does which of the following?

Answer :
  • Both A & B

What is an alternate to 'merge' in git?

Answer :
  • Rebase

How do you create a copy of a lab under your own GitHub account so that you can solve the lab?

Answer :
  • Forking it via the GitHub interface.

What's the opposite of git clone, instead of downloading your code from GitHub, uploads your changes and code back to GitHub?

Answer :
  • git push

What happens if you run this command from the master branch? Git checkout -b phase2

Answer :
  • A new branch called 'phase2' will be created and switched to

Which command can be used to list the branches that already merged into current branch?

Answer :
  • git branch --merged

Which option to git commit will modify last commit message?

Answer :
  • -amend