Git Quiz
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 47% Most missed: “After a recent release with a stack trace, an issue is create that indicates the…”

Git MCQs For LinkedIn Skill Assessments.

Git Quiz
Time left 00:00
25 Questions

1. What is the status of the beta-notes.js file in the following output?
shell
Changes not staged for commit:
(use 'git add ...' to update what will be committed)
(use 'git checkout -- ...' to discard changes in working directory)
modified: beta-notes.js
2. What command finds the HEAD of the current branch?
3. What command displays the difference between the working tree and the stage/index area, as well as files not tracked by Git?
4. Which key press returns a set of suggestions to pick from, when writing a Git command?
5. Which of the following is called dumb protocol?
6. You would like to restore some previously stashed work to a new branch. How can you do that?
7. How could you squash multiple commits together without using git merge --squash?
8. Which statement is true of the git push command?
9. Which version onwards did Git offer reversing a file back to what it looked like when last committed?
10. When Git Workflows contain a long-running branch, what purpose does the long-running branch serve?
11. Which option enables inclusion of committer name in custom log format?
12. What commands would you use to force an overwrite of your local files with the master branch?
13. What files is this .gitignore programmed to leave out?
shell
#.swift
build/
*.txt
*.metadata
14. After you make changes to a local repository, you run the following command. What will this do?
'git commit -a -m 'Refactor code base
15. Which of these terms best describes Git?
16. After checking out a specific commit, you receive a warning message indicating You are in 'detached HEAD' state. What is Git warning you of?
17. How would you create a custom shortcut or command across your git environment?
18. If you cloned an existing git repository, what would happen?
19. How would you delete unreachable objects older than a specified time from your project database?
20. What types of tags does Git support?
21. Your current repository has three branches: master, beta, and push-notifications. You have just finished the notification feature and commit the changes to the push-notification branch, and you want to include them in the beta branch. How can you accomplish this?
22. What option can you use to apply git configurations across your entire git environment?
23. While modifying a file, you're unexpectedly assigned an urgent bug fix on another branch. How can you temporarily save your local work without committing?
24. What command lets you create a connection between a local and remote repository?
25. What is the difference between git branch -d and git branch -D?