This question already has an answer here:
(这个问题在这里已有答案:)
I cloned a Git repository and then tried to roll it back to a particular commit early on in the development process.
(我克隆了一个Git存储库,然后尝试在开发过程的早期将其回滚到特定的提交。)
Everything that was added to the repository after that point is unimportant to me so I want to omit all subsequent changes from my local source code. (在该点之后添加到存储库的所有内容对我来说都不重要,因此我想省略本地源代码中的所有后续更改。)
However, when I try to roll back in the GUI tool it doesn't update my local file system - I always end up with the latest source code for the project.
(但是,当我尝试回滚GUI工具时,它不会更新我的本地文件系统 - 我总是最终得到项目的最新源代码。)
What's the correct way to just get the source for a repository as of a particular commit in the project's history and omit all later updates?
(从项目历史中的特定提交中获取存储库的源代码的正确方法是什么,并省略所有后续更新?)
ask by translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…