Need help downloading git -completion.bash file

I am new to git. Every time I try to download my git-completion.bash , I received 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 problem?

+6
source share
1 answer

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. Instead, you should save the raw file https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash .

+8
source

Source: https://habr.com/ru/post/978842/


All Articles