Question: When I open my GitBash (on Windows 10) I am getting the below error:

```
bash: command substitution: line 1: syntax error near unexpected token `)'
bash: command substitution: line 1: `date "+%D %X")'
bash: command substitution: line 1: syntax error near unexpected token `)'
bash: command substitution: line 1: `__git_ps1 "(%s)")'

```

What should I do to fix this?

Answer: 
I had a similar error. In my case my bash\_profile had a line with \_\_git\_ps1 later followed by \n$. I changed the \n$ to its ascii equivalent \012$ and it fixed the problem.
Probably you are doing command substitution, it should be like `$(date +%D %X)`