You sound really confused.
All those function definitions you ran were in the shell. If you ran them directly from the command line, then they only affect the current running shell environment. So if you had just closed the terminal and started a new one, the definitions would have been lost, and everything would be back to normal. Or you could have unset the definition with unset -f
, as described in the comment.
This is why re-installing git has no bearing on your problem.
Renaming your .gitconfig
won't make any difference either. You didn't make the changes in your .gitconfig
, so why would it?
If you had followed the advice in your previous question, and set up an alias using git's aliasing method instead, then moving your .gitconfig
would indeed have had an effect, and would have effectively removed your alias (along with all the rest of your configuration).
Incidently, all this confusion with the base command being overridden is the main reason git
doesn't allow this type of name remapping under its own aliasing system. To quote the git-config manpage:
"To avoid confusion and troubles with script usage, aliases that hide
existing git commands are ignored."
git() { git(); }
, then you definedgit
as a function that does nothing but call itself. Undefine it (unset -f git
) or redefine it to something sensible first. – Gilles 'SO- stop being evil' Sep 24 '12 at 00:21