0

I am new to Github and I decided to use Notepad++ as Git Bash's editor instead of Vim. So I followed this post How do I use Notepad++ (or other) with msysgit? and ran this in Git Bash

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

Then when I ran git commit, Notepad++ would open up as expected. After I have closed Notepad++ and ran git status, it said that the following files were untracked:

noPlugin
nosession
notabbar
notcommited.txt

So the question is: should I add these files to git to track as well? Thanks!

Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
ttriet204
  • 353
  • 1
  • 5
  • 13
  • 3
    I would suggest you do not add those files to the repo if you are working with other contributer. Maybe they work on a -nix-machine and maybe do not need those particular files. So everything that belongs to your particular working-space is needed in the shared repo. – ckruczek May 22 '15 at 11:27
  • 7
    `notabbar`, `nosession`, `noPlugin` are files generated because git misinterpreted your `Editor` argument. You should not add them. If still facing this issue, create a batch file named `git_npp.bat` with contents: `"C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst -notabbar -nosession -noPlugin %*` & use that batch file as editor. – anishsane May 22 '15 at 11:27
  • Thank you all! You are so fast and so helpful. So I guess I should just leave them there and not add them to git after all. – ttriet204 May 22 '15 at 11:32
  • 1
    There may be an issue with the quoting used to provide parameters to Notepad. Can you edit the question to include the `editor` line from your `~/.gitconfig` file? – Anthony Geoghegan May 22 '15 at 13:42

1 Answers1

1

Consider adding files that you want to keep, but not track, to your .gitignore file.

cognoscente
  • 88
  • 1
  • 8
  • 2
    Although this is marked as the answer, and is good advice in general, I don't think this addresses the real issue in the OP's question, which is that those files should not have been produced in the first place. They indicate that the OP's command was malformed and Git was misinterpreting the arguments as files instead of command-line arguments to NotePad++ – drwatsoncode Oct 27 '16 at 18:12
  • Yeah I gotta downvote this for basically misleading the asker and anyone sufficiently like them by not forcing them to realize that their editor command is broken and not doing what they want. Their misunderstanding will probably eventually cause more problems one day. – mtraceur Aug 22 '22 at 21:10