I'm using git on Mac OS X. How do I revert changes to a file? The changes aren't committed yet. I tried
localhost:myproject davea$ git checkout -- .gitignore
error: pathspec '.gitignore' did not match any file(s) known to git.
The above error doesn't make sense because when I try and pull from the remote repository, it complains taht I have the file it can't overwrite ...
localhost:myproject davea$ git pull origin master
Username for 'https://github.com': myuser
Password for 'https://myuser@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/JBSinc/myproject.git/'
localhost:myproject davea$ git pull origin master
Username for 'https://github.com': myuser
Password for 'https://myuser@github.com':
From https://github.com/JBSinc/myproject
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
.gitignore
Please move or remove them before you can merge.
Aborting