Bird
0
0

What is the primary purpose of using git rebase -i when editing commit messages?

easy📝 Conceptual Q1 of 15
Git - Rebasing
What is the primary purpose of using git rebase -i when editing commit messages?
ATo create a new branch from the current commit
BTo merge two branches automatically
CTo delete the entire commit history
DTo interactively change commit messages or reorder commits
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of interactive rebase

    The git rebase -i command allows you to interactively edit commits, including changing messages or reordering commits.
  2. Step 2: Compare with other options

    Options A, B, and C describe different git operations unrelated to editing commit messages.
  3. Final Answer:

    To interactively change commit messages or reorder commits -> Option D
  4. Quick Check:

    Interactive rebase purpose = change commit messages or reorder commits [OK]
Quick Trick: Use git rebase -i to edit commit messages easily [OK]
Common Mistakes:
  • Confusing rebase with merge
  • Thinking rebase deletes history
  • Using rebase to create branches

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes