Fata
Fata

Reputation: 53

git push error . bash: syntax error near unexpected token `newline'

I want to push changes to github:

$ git push origin <add-fata-branch>

the following error message is printed:

bash: syntax error near unexpected token `newline'

Upvotes: 1

Views: 9599

Answers (1)

bk2204
bk2204

Reputation: 76459

The problem is that you're using unquoted angle brackets. If your branch is called add-fata-branch, then you should write git push origin add-fata-branch without the angle brackets. If your branch is really called <add-fata-branch> (which is not recommended), you must put quotation marks around it: git push origin "<add-fata-branch>".

If you're reading a guide, be aware that the angle brackets are designed to indicate a placeholder and shouldn't be typed literally.

Upvotes: 3

Related Questions