How to Solve Error: “syntax error near unexpected token `newline'”

Here is a simple tutorial on how to solve error: “syntax error near unexpected token `newline'”

Symptom

The message syntax error near unexpected token `newline’ is displayed after the git add command is executed.

Analysis

The command contains a diamond operator (<>).

Solution

Delete the diamond operator (<>) in the command, for example, $ git add README.md.

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *