Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Git Basics Getting Started With Git Committing Changes

Andrew Izquierdo
Andrew Izquierdo
3,212 Points

I downloaded Visual Studio Code (as per the Git Installation Video's recommendation), so should I still use "nano"?

Towards the beginning of the video, he inputs: "nano README" , but says that we can use whichever text editor we prefer.

I downloaded Visual Studio Code because it was recommended. So now I am wondering, should I be using "nano README" or "notepad README" ? (i am running on a Windows computer, and using "nano" seems to be working fine)

Thanks for the help!

3 Answers

Steven Parker
Steven Parker
228,026 Points

If you're ready for the big time (my admittedly biased opinion), you can install the VSVIM add-on to give you nearly all the power of VIM right in Visual Studio.

There's a workshop on Harnessing the Power of Vim to get you started.

Totally up to you. I use nano because I like the linux console style of it. If you have more than one installed play around and see what you like!

Gabbie Metheny
Gabbie Metheny
33,778 Points

As of the current version of git for Windows (2.19.1.windows.1), git actually suggests Visual Studio Code as git's default editor! If it isn't currently your default editor for git, updating w/ the command git update-git-for-windows (command available on v2.16.1 and above) will install the latest version of git and allow you to do some configuring in the installation process.

After I updated, and ran git config --list, I saw this line had been added to my configurations:

git config --list
core.editor='C:\Program Files\Microsoft VS Code\Code.exe' --wait

You can also make that change manually, without updating git. There are some instructions on configuring git's editor here. You'll just have to make sure Code.exe is installed in the same place in your path as mine. To open your gitconfig with Visual Studio Code, type code ~/.gitconfig into your terminal, then add the following lines to the gitconfig:

  editor = 'C:\\Program Files\\Microsoft VS Code\\Code.exe' --wait

And to create and/or open a file with Visual Studio Code, like Tommy did with nano in the video, just type code README.md, or the name of the file you want to create/open, in your terminal. I use Visual Studio Code w/ the integrated terminal for pretty much everything, so git making this update has just streamlined my workflow even more :)