Computers

Professional Development

Image

Git quiz 1

7
plays

10 questions

Show Answers
See Preview
  • 1. Multiple Choice
    30 seconds
    1 pt

    How can you check your current git version?

    git --v

    git --version

    git --option

    git --current

  • 2. Multiple Choice
    30 seconds
    1 pt

    What command lets you create a connection between a local and remote repository?

    git remote add new

    git remote add origin

    git remote new origin

    git remote origin

  • 3. Multiple Choice
    30 seconds
    1 pt

    Describe what the following git commands do to commit history.

    git reset --hard HEAD~5 (reset the current branch to the commit just before the last 5)

    git merge --squash HEAD@{1} (HEAD@{1} is where the branch was just before the previous command. This command sets the state of the index to be as it would just after a merge from that commit)

    reset the commit branch back before the last 5 commits, then squashes them into a single commit.

    delete the last 5 commits

    merges the last 5 commits into a new branch

    reset the HEAD to the 5th commit in the repo, then merges to the master branch.

  • Answer choices
    Tags
    Answer choices
    Tags

    Explore all questions with a free account

    Already have an account?