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

前端 未结 5 878
抹茶落季
抹茶落季 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:47

    It is to differentiate source and destination. You can also change it to be more meaningful:

    --src-prefix=

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

    --dst-prefix=

    Show the given destination prefix instead of "b/".
    

    http://git-scm.com/docs/git-diff

提交回复
热议问题