Can GitHub show the history of changes made to one file in patch form?

后端 未结 4 1650
别那么骄傲
别那么骄傲 2020-12-22 18:52

If you do git log --patch -- path/to/file, you will get the history of the file along with a diff of all the changes made to it with each commit, like this:

4条回答
  •  旧巷少年郎
    2020-12-22 19:49

    The following URL will show all the commits for a single file in a format similar to git log -p:

    http://github.com///commits//

    ...where:

    • is the username of the person that owns the repo
    • is the repo name
    • can be 'master' or any other branch
    • is hopefully self-explanatory

    Picking at (somewhat) random, here is an example from the vim-fugitive repo.

提交回复
热议问题