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
Andrew Izquierdo3,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!
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 Metheny33,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
[core] 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 :)