Autocomplete git in mac OS not working?
The git-completion.bash distributed is a Windows file with "\n\r" as a newline. You need to remove the '\r'.
For vim users, just do ":set ff=unix".
I had tried to use curl -O but the url was wrong and I ended up copying the text which caused the error.
Using this command made it work perfectly:
curl -O https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
Thanks a lot everyone for your help!