What is the reason for the /a /b prefixes of git diff

As mentioned in the diff man page, a/ and b/ represent the prefix to differentiate source and destination.

Actually, you have the options:

--no-prefix

Do not show any source or destination prefix.

--src-prefix=<prefix>

Show the given source prefix instead of “a/”.

--dst-prefix=<prefix>

Show the given destination prefix instead of “b/”


Gringo Suave adds in the comments:

Went with:

git diff --src-prefix="SRC " --dst-prefix="DST " 

to make double-click select and paste work.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)