Zach Olivare - 2022 Mar 03
Use the text editor you're most comfortable with
Whether you installed Git yourself, or you're using the version that came pre-installed on your OS, the default text editor will be Vim. Too often people leave this default and struggle through learning an un-intuitive text editor while they're also trying to learn Git.
Even worse, some can't distinguish Git from Vim, thinking that they're one in the same; because for many, their first time running git commit
is also the first time they've seen Vim. The confusion of the text editor becomes muddled together with the confusion of learning Git, so they turn to a Git GUI tool and immediately lose so much of the power behind Git.
You can tell git to use whatever text editor you prefer. Then, when you run git commit
or git rebase -i
, instead of Vim opening in the terminal, your chosen text editor will pop up for you! You then edit the file, save the file, and close that window of your text editor.
Done! ✅
The details change slightly depending on the text editor you want to use. I will provide info for several common text editors here.
code
from the command line to open directories or files.Tools -> Create Command-line Launcher
. Accept the default path.