Spread the love

1. When we want to update our local repository to reflect changes made in the remote repository, which command would we use?

  • git clone <URL>
  • git push
  • git pull
  • git commit -a -m

2. git config –global credential.helper cache allows us to configure the credential helper, which is used for …what?

  • Troubleshooting the login process
  • Dynamically suggesting commit messages
  • Allowing configuration of automatic repository pulling
  • Allowing automated login to GitHub

3. Name two ways to avoid having to enter our password when retrieving and when pushing changes to the repo. (Check all that apply)

  • Implement a post-receive hook
  • Use a credential helper
  • Create an SSH key-pair
  • Use the git commit -a -m command.

4. Name the command that gathers all the snapshots we’ve taken and sends them to the remote repository.

  • git commit -a -m
  • git push
  • git pull
  • git clone <URL>

5. Name the command that gathers all the snapshots we’ve taken and sends them to the remote repository.

  • git pull
  • git remote update
  • git checkout
  • git log -p -1

6. If we need to find more information about a remote branch, which command will help us?

  • git fetch
  • git checkout
  • git remote update
  • git remote show origin

7. What command will download remote branches from remote repositories without merging the content with your current workspace automatically?

  • git checkout
  • git pull
  • git fetch
  • git remote update

8. What type of merge creates a new merge commit?

  • Fast-forward merge
  • Implicit merge
  • Explicit merge
  • Squash on merge

9. What method of getting remote contents will automatically merge the remote branch with the current local branch?

  • git fetch
  • git checkout
  • git remote update
  • git pull

10. If you’re making changes to a local branch while another user has also made changes to the remote branch, which command will trigger a merge?

  • git push
  • git pull
  • git rebase
  • git fetch

11. Which of the following is a reason to use rebase instead of merging?

  • When you want to keep a linear commit history
  • When you want a set of commits to be clearly grouped together in history
  • When you are on a public branch
  • When pushing commits to a remote branch

12. Where should we keep the latest stable version of the project?

  • The master branch
  • A separate branch from the master branch
  • The debug branch
  • A remote branch

13. Which of the following statements represent best practices for collaboration? (check all that apply)

  • When working on a big change, it makes sense to have a separate feature branch.
  • You should always rebase changes that have been pushed to remote repos.
  • Always synchronize your branches before starting any work on your own.
  • Avoid having very large changes that modify a lot of different things.

14. What command would we use to change the base of the current branch?

  • git checkout <branchname>
  • git pull
  • git rebase <branchname>
  • git fetch

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *