我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们
文章版本: GitHub.com

Tracking changes in a file

You can trace changes to lines in a file and discover how parts of the file evolved over time.

With the blame view, you can view the line-by-line revision history for an entire file, or view the revision history of a single line within a file by clicking . Each time you click , you'll see the previous revision information for that line, including who committed the change and when.

Git blame view

In a file or pull request, you can also use the menu to view Git blame for a selected line or range of lines.

Kebab menu with option to view Git blame for a selected line

Tip: On the command line, you can also use git blame to view the revision history of lines within a file. For more information, see Git's git blame documentation.

  1. 在 GitHub 上,导航到仓库的主页面。

  2. Click to open the file whose line history you want to view.

  3. In the upper-right corner of the file view, click Blame to open the blame view.

    Blame button

  4. To see earlier revisions of a specific line, or reblame, click until you've found the changes you're interested in viewing.

    Prior blame button

问问别人

找不到要找的内容?

联系我们