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

前端 未结 5 862
抹茶落季
抹茶落季 2020-12-23 13:34

I\'ve been using git for some years now and always wondered why git diff prefixes the names of modified files with a/ and b/. I expected to eventually stumble upon a use-cas

5条回答
  •  借酒劲吻你
    2020-12-23 13:51

    As mentioned in the diff man page, a/ et 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=
    

    Show the given source prefix instead of "a/".

    --dst-prefix=
    

    Show the given destination prefix instead of "b/"

提交回复
热议问题