I am trying to perform Git diff in two branches with the same file. I want to get the difference of two files.
- If there is a fatal error
- If there is a difference/ not matched
- If there is NO difference/ matched
I tried saving the command in a variable to get the result. Example: GIT_DIFF=$(git diff RB_202005:/test.txt RB_202006:/test.txt) and then printing the variable (Example: echo $GIT_DIFF) but nothing is being returned.