I was trying to set up some git aliases by adding these lines to my ~/.gitconfig
file:
[alias]
st = status
ci = commit
br = branch
Found the same problem in OSX after installing Foundation.
The offending line in my .bash_profile was a malformed foundation export path. I didn't remove the /foundation at the end of the line, so it was pointing to a binary file, not a folder.
Just fixed it, reloaded Terminal and everything worked again.