Note to self: Don’t name my git branches “tests”

I have sometimes had a git branch called “tests” because I was adding tests or working on tests. The problem is that many projects have a “tests” directory so if you have a “test” branch, you get this:

$ git diff tests
fatal: ambiguous argument 'tests': both revision and filename
Use '--' to separate paths from revisions, like this:
'git  [...] -- [...]'

You can of course use git diff -- tests and it will work, but it’s easier to just not name a branch “tests” in the first place.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>