Git MCQ Test: Git MCQs - Practice Questions
1. What is the purpose of 'git stash' and when might you use it?
2. What is 'git rebase --exec' used for, and how can it be beneficial?
3. How do you create a new branch without switching to it?
4. What does 'git checkout' do?
5. Explain the purpose of 'git tag' and how it can be useful in version control.
6. Explain the concept of 'git hooks' and provide an example use case.
7. Explain the use case and potential risks of 'git reflog delete' in Git.
8. What is 'git gc' used for, and how does it impact Git repository maintenance?
9. What is 'git stash -p' used for, and how does it differ from a regular 'git stash'?
10. What is 'git reflog show' used for, and how can it be beneficial in Git?
11. What is 'git revert -m' used for, and in what scenario might it be applicable?
12. Explain the concept of 'git squash' and how it is different from a regular commit.
13. How do you resolve a merge conflict in Git using a graphical tool?
14. What is the purpose of 'git rebase -i' and how is it used?
15. Explain the concept of 'git blame' and how it can be useful.
16. What is 'git worktree lock' used for, and how can it be beneficial in Git workspace management?
17. What is 'git reflog,' and how can it be helpful in Git?
18. Explain the concept of 'git sparse-checkout init' and its use in working with sparse repositories.
19. How does 'git bundle' work, and in what scenarios might it be beneficial?
20. Explain the purpose and potential risks of 'git bisect reset' in Git.
21. What does 'git remote -v' show?
22. What does 'git commit' do in Git?
23. Explain the benefits of using 'git rebase' over 'git merge.'
24. What is the purpose of 'git fetch'?
25. Explain the difference between 'git fetch' and 'git pull.'
26. What is the purpose of 'git sparse-checkout set' and how can it be used effectively?
27. Explain the significance of the 'git bisect' command in Git.
28. What is the purpose of 'git stash'?
29. Explain the purpose and potential risks of 'git gc --prune' in Git repository maintenance.
30. What is 'git rebase --onto' used for, and provide a scenario where it might be beneficial?