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

____________ removes untracked files from your working directory.

Answer :
  • git clean

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

How do you check the state of your local git repository since your last commit?

Answer :
  • git diff

If you want to perfome git reset but do not know all the options. Which command is used to view the descriptions?

Answer :
  • git help reset

After mistakenly staging a file named myFile to the index, how would you remove it from the index to exclude it from your next commit?

Answer :
  • git reset myFile.txt

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 will list tags with the p1 series?

Answer :
  • git tag -l 'p1'