introduction to git and github week 4

Practice Quiz: Pull Requests

1. What is the difference between using squash and fixup when rebasing?

  • Squash deletes previous commits.
  • Squash combines the commit messages into one. Fixup discards the new commit message.
  • Squash only works on Apple operating systems.
  • Fixup combines the commit messages into one. Squash discards the commit message.

2. What is a pull request?

  • The owner of the target repository requesting you to add your changes.
  • A request sent to the owner and collaborators of the target repository to pull your recent changes.
  • A request to delete previous changes.
  • A request for a specific feature in the next version.

3. Under what circumstances is a new fork created?

  • When you want to experiment with changes without affecting the main repository.
  • When you clone a remote repository to your local machine.
  • During a merge conflict.
  • When there are too many branches.

4. What combination of command and flags will force Git to push the current snapshot to the repo as it is, possibly resulting in permanent data loss?

  • git push -f
  • git log –graph –oneline –all
  • git status
  • git rebase -i

5. When using interactive rebase, which option is the default, and takes the commits and rebases them against the branch we selected?

  • squash
  • edit
  • reword
  • pick

Devendra Kumar

Project Management Apprentice at Google

Leave a Reply