6

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?

Mureinik
  • 297,002
  • 52
  • 306
  • 350
Eldan Shkolnikov
  • 441
  • 1
  • 6
  • 13

1 Answers1

8

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 .

Mureinik
  • 297,002
  • 52
  • 306
  • 350