[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Learning from your code's history\n\nThis page describes how you can use Cloud Source Repositories to learn how files and repositories change over time.\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nUnderstanding the history of your code can help you make better decisions about\nnew features and code changes. A repository's history can help you:\n\n- Understand why the code works the way it does.\n- Learn how other developers implemented a feature.\n- Understand why code changes occurred.\n- Investigate bugs or opportunities to improve performance.\n- Identify when code changes were introduced to narrow down the cause of a regression.\n\nFinding your code's history\n---------------------------\n\nYou can find your code's history in several ways:\n\n- The [Commit Details view](/source-repositories/docs/commit-details-overview). This view displays information about [commit changes](/source-repositories/docs/viewing-commit-changes), such as which files were changed in a commit. You can also [follow the history](/source-repositories/docs/following-file-history) of any changed files.\n- The [Change History](/source-repositories/docs/following-file-history#view_the_history_of_a_file) pane. This pane displays all commits applied to a file. From this pane, you can select a commit and open it in the Commit Details view. In addition, you can diff this file against a previous commit or compare it against another branch of the repository. To open the Change History pane, click **Change\n history** in the File view.\n- The [Blame](/source-repositories/docs/following-file-history#view_the_blame_panel) panel. While the Change History pane displays a list of commits that affect a file, the Blame panel displays a line-by-line history of changes. For each changed line, the Blame panel lists the name of the commit author. It also displays a number to indicate when the change occurred in the file's history. For example, a change that occurred in the first commit for the file would have a #1, the second would have a #2, and so on. You can hover over the change to see more details about the commit, and you can click the change to open the Change History pane with that change selected.\n\nPerforming code history tasks\n-----------------------------\n\nTo learn more about your code's history, see:\n\n- [Viewing commit changes](/source-repositories/docs/viewing-commit-changes).\n- [Following the history of a file](/source-repositories/docs/following-file-history)."]]