@zacherates Isn't that because you have a branch named foo in that
repository? Recent versions of Git would tell you about the
ambiguity. In the meantime, using ./foo is probably the easiest way
to resolve it.
Note, however, that git checkout ./foo and git checkout HEAD ./foo
are not exactly the same thing; case in point:
$ echo A > foo
$ git add foo
$ git commit -m 'A' foo
Created commit a1f085f: A
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
$ echo B >> foo
$ git add foo
$ echo C >> foo
$ cat foo
A
B
C
$ git checkout ./foo
$ cat foo
A
B
$ git checkout HEAD ./foo
$ cat foo
A
(The second add stages the file in the index, but it does not get
committed.)
Git checkout ./foo means revert path ./foo from the index;
adding HEAD instructs Git to revert that path in the index to its
HEAD revision before doing so.