Bird
0
0

Given the command git config --global core.editor "code --wait", what happens when you run git commit?

medium📝 Command Output Q13 of 15
Git - Configuration and Aliases
Given the command git config --global core.editor "code --wait", what happens when you run git commit?
AGit opens VS Code and waits until you close it before completing the commit
BGit opens VS Code but immediately completes the commit without waiting
CGit throws an error because of the spaces in the command
DGit uses the default editor ignoring this setting
Step-by-Step Solution
Solution:
  1. Step 1: Understand the meaning of code --wait

    The --wait flag tells VS Code to pause Git until the editor window is closed.
  2. Step 2: Predict Git's behavior on commit

    Git will open VS Code and wait for you to finish editing the commit message before proceeding.
  3. Final Answer:

    Git opens VS Code and waits until you close it before completing the commit -> Option A
  4. Quick Check:

    Editor with --wait pauses Git until done [OK]
Quick Trick: Use --wait flag so Git waits for editor to close [OK]
Common Mistakes:
  • Ignoring the --wait flag effect
  • Assuming Git commits immediately
  • Thinking spaces cause errors without quotes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Git Quizzes