I am new to git. Every time I try loading my git-completion.bash
I got the following error message
line 1: syntax error near unexpected token `newline'
-bash: git-completion.bash: line 1: `<!DOCTYPE html>'
Does anyone know how to solve this issue?
Essentially, you start typing a word, then you hit the tab key and Git then tries to guess based on the context what the rest of the command, the file path, or the branch name ought to be. It can really save you a lot of typing.
You accidentally saved the HTML representation of the file from GitHub (https://github.com/git/git/blob/master/contrib/completion/git-completion.bash) instead of the file itself. You should save the raw file instead - https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With