Git MCQ Test: Git MCQs - Practice Questions
1. What is the purpose of 'git rebase -i' and how is it used?
2. How does 'git revert' handle conflicts, and how can conflicts be resolved?
3. What is the purpose of 'git stash' and when might you use it?
4. What is 'git gc' used for, and how does it impact Git repository maintenance?
5. What is 'git stash -p' used for, and how does it differ from a regular 'git stash'?
6. Explain the purpose of 'git submodules' and when you might use them.
7. Explain the purpose of 'git push --force' and when it should be used with caution.
8. How does 'git worktree add' enhance workspace management in Git, and when might it be beneficial?
9. Explain the concept of 'git rebase --skip' and in what scenario might it be applicable?
10. What is 'git remote' and how is it used in a Git repository?
11. What is the purpose of 'git init'?
12. Explain the benefits of using 'git rebase' over 'git merge.'
13. What is the purpose of '.gitignore'?
14. Explain the concept of 'git sparse-checkout init' and its use in working with sparse repositories.
15. Explain the concept of 'git hooks' and provide an example use case.
16. What is the purpose of 'git sparse-checkout set' and how can it be used effectively?
17. How do you resolve a Git merge conflict?
18. What does 'git checkout' do?
19. Explain the difference between 'git fetch' and 'git pull.'
20. How do you revert a Git commit?