Fixing your PATH, temporarily
If your path is screwed up, as a temporary fix you can run the following to reset it, like Daniel Beck said:
Now, all commands in your current shell should run as usual. If not, try
hash -r (in Bash) to rehash the contents of your PATH directories.
Finding the problem's cause
You can then try to trace down the error. Since the Git installer only adds its path to
/etc/paths.d, it's not likely that this caused your shell to malfunction. It's probably a line with
PATH= in one of your shell's configuration file.
For Bash on OS X, the config files are typically one of the following:
You can edit these files with
open -e ~/.bash_profile, for example. If
open still isn't recognized, run it with its full path, i.e.
/usr/bin/open -e ~/.bash_profile. Look for a line that assigns the
PATH, and remove it. Save the file, and open a new shell to see if it worked.
Since a login shell is started with the Terminal in OS X (instead of a non-login shell like in many other Linux/Unix variants), it's unlikely that
~/.bashrc is compromised.