1

I use the Git Shell (Windows Powershell) that comes with github desktop. I have created a gitignore file and now want to ignore all the already committed files in my repository. From an answer here on stackoverflow I got this line which seems to work for everyone:

git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached

It doesn't work for me though. I get the error message:

fatal: pathspec '' did not match any files

Can someone be so kind as to give a newby a helping hand? I know that I have loads of files in my repository that are already committed and match the file types defined in the gitignore file. I searched on the web a lot but couldn't figure it out. I know this has been answered but I think I lack the basic understanding so I do something wrong and can't figure out what it is.

Xam Eseerts
  • 367
  • 3
  • 19
  • 2
    Did you try the PowerShell syntax from here: http://stackoverflow.com/a/28458503/1176983 ? – Tomer Oct 02 '16 at 20:28
  • Hey thanks for the comment! It did the trick but now if I want to commit to master it always fails -.- – Xam Eseerts Oct 03 '16 at 12:42
  • Ok so when I did the commit with the github desktop application it failed every time. When I finally did it with git posh it worked like a charm. Very strange – Xam Eseerts Oct 03 '16 at 12:49

0 Answers0