Recall & Review
beginner
What is the purpose of setting an editor in Git configuration?
Setting an editor in Git configuration tells Git which text editor to open when you need to write commit messages or edit other text files during Git operations.
Click to reveal answer
beginner
How do you set Vim as the default editor for Git?
You run the command:
git config --global core.editor "vim". This sets Vim as the editor for all Git commands that require text editing.Click to reveal answer
beginner
What command shows the current editor configured in Git?
Use
git config --global core.editor to see which editor is set globally for Git.Click to reveal answer
intermediate
Why might you want to configure a different editor for Git than your system default?
You might prefer a simpler or more powerful editor for writing commit messages, or your system default editor might not be comfortable or available in the terminal.
Click to reveal answer
intermediate
How can you set Nano as the editor for Git only in the current repository?
Run
git config core.editor "nano" without the --global flag. This sets Nano as the editor only for the current Git repository.Click to reveal answer
Which Git command sets the default editor globally?
✗ Incorrect
The correct syntax is
git config --global core.editor "code" to set the editor globally.What happens if you do not set an editor in Git?
✗ Incorrect
If no editor is set, Git uses the system default editor to open commit messages.
How do you check the editor configured for Git in the current repository only?
✗ Incorrect
Running
git config core.editor shows the editor set for the current repository.Which of these editors is commonly used in Git configuration for simplicity?
✗ Incorrect
Nano is a simple terminal-based editor often used with Git.
What does the command
git config --global core.editor "code --wait" do?✗ Incorrect
The
--wait flag tells Git to wait until you close Visual Studio Code before continuing.Explain how to configure a text editor for Git and why it is useful.
Think about how Git opens text editors during commits.
You got /3 concepts.
Describe the difference between setting an editor globally and locally in Git.
Consider where the configuration applies.
You got /3 concepts.