Git克隆特定版本的远程存储库 [英] Git clone particular version of remote repository
本文介绍了Git克隆特定版本的远程存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我该怎么做?
<解决方案
我该怎么做?
使用 git-reset 为此:
git clone [remote_address_here] my_repo
cd my_repo
git reset --hard [ENTER这里的提交哈希你想要]
I cloned a remote git repository about a month ago. The remote repository has undergone many changes and has now become unstable. Now I need another copy of the repository, version identical to the one I cloned a month ago.
How do I do this?
You could "reset" your repository to any commit you want (e.g. 1 month ago).
Use git-reset for that:
git clone [remote_address_here] my_repo
cd my_repo
git reset --hard [ENTER HERE THE COMMIT HASH YOU WANT]
这篇关于Git克隆特定版本的远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!