Note that changing the editor to code didn’t work quite as we wanted it to - because we’re leaving the terminal environment in order to go and edit the file in VS Code, we need to tell git to wait for us. What if you want to change the editor used by git to something external to the terminal, like VS Code? Here’s how: First let’s look at how to change git’s default text editor to nano, and what nano looks like in practice:Īs you can see, nano is much more straight forward than vim (not least because it gives you the commands you need at the bottom of the screen!), but it still exists completely in the terminal (which has pros and cons). Personally, I love vim, but if you’re not familiar with it it can make things a bit difficult and really mess up your flow. In the example above, as on many systems, the default editor is vim. Below is how to do this on a unix (OSX or Linux) system.įirst, check what your current system default is (you can pause the video below and copy the text command out of it - try it now!): We forgot to add a -m with a message! Now we’re in the dreaded vim text editor…īut what if there was another way? By changing the git config, we can specify a different editor for git to launch us into if it needs to do so.