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! While you're at it, check out some resources Treehouse students have shared here.

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

Notepad++ and Git on a PC. HELP PLEASE

I'm on the Committing Changes video right now in the "Getting Started with Git" section.
When the video said "nano README", of course I tried typing in "notepad README." I got a message saying it wasn't installed and that I needed to install wine1.4 or something, so I did. When that finished installing (it took a few minutes), I tried commands "notepad README," "notepad --version," and "notepad++ README" and none of those work. For the first two commands, I receive a message saying "application tried to create a window, but no driver could be loaded. Make sure that your x server is running and the $DISPLAY is set correctly. err:systray:initialize_systray Could not create tray window "

help.

3 Answers

Hi Catherine,

Using Git on a Windows PC can be frustrating. Here's what I (and others) strongly suggest you do to setup Notepad to work well with Git. It's fast--you can do it in a minute or two. Let me know if it works for you: http://stackoverflow.com/questions/1634161/how-do-i-use-notepad-or-other-with-msysgit/2486342#2486342

I tried

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"

and then typed notepad++ README but it didn't work. Instead I got sh.exe":: notepad++: command not found.

Trying notepad README gives nothing and I can't even type anything else so I'm forced to restart Git Bash.

Has anyone run into these problems? If so, what did you do?

Kenneth Myers
Kenneth Myers
16,009 Points

I had the same problem and after spending hours trying to figure out how to fix this I finally got mine working (all other solutions with git config etc didnt work for me):

  1. Install Visual Studio (takes a while and requires a restart)
  2. Download gitpad https://github.com/github/gitpad
  3. Extract folder, open it, open up the Gitpad file that has the type of "Microsoft visual studio solution"
  4. This opens up in visual studio, click the green play/run button at the top
  5. close this
  6. Go back to the Gitpad master folder
  7. go to obj/x86/debug/
  8. Open the application file

it should now work when you write things like "notepad Readme.txt" don't use notepad++ readme.txt, it didnt work for me but using notepad still opened up notepad++ since its the default editor