-1

I have a simple question:

How can I run the command git diff on my html file when the file name has spaces in it? The name of the file is: Test Business-Tech.html However everytime I run the following command:

git diff Test Business-Tech.html

I get the following error: fatal: ambiguous argument 'TEST': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' ch.html: command not found

I cannot change the name of the HTML file... please help!

C. Lewis
  • 145
  • 1
  • 6
  • 17

1 Answers1

1

The answer may depend on the OS you are running, but the first thing I would try is putting a quote around the filename: git diff 'Test Business-Tech.html'

Randy Leberknight
  • 1,363
  • 9
  • 17
  • This did not work sadly.. I get the following error-->fatal: ambiguous argument 'Test Business-Tech.html': unknown revision or path not in the working tree. – C. Lewis Dec 27 '17 at 19:44
  • UPDATE: Have to use double quotes "Test Business-Tech.html" for it to work :) – C. Lewis Dec 28 '17 at 15:53