Git Repo问题 [英] Git Repo question
问题描述
嗨
我只想为我的人使用vs 2017本地git repo。
无需连接网络任何远程repo或git服务器或tfs。
如果我改变一个文件10次并提交10次(没有分支,只有主人),我该如何让我恢复 到第五个?
并保持6 7 8 9 10?我希望随时恢复1~10版本!
谢谢!
你好imacrl,
谢谢你的提问。
根据您的描述,这可以通过使用命令行来实现。
首先,使用"cd"将目录更改为本地 repo的路径。
然后使用下面的命令行,切换到特定版本:
git checkout< commit id>返回主分支:
git checkout master
希望有所帮助。
祝你好运,
Fletcher
Hi
I just want use vs 2017 local git repo only for my person.
No network to connect any remote repo or git server or tfs.
If I change one file 10 times and commit it 10 times(no branch, just only master ),how do I do let me revert to fifth ?
and keep 6 7 8 9 10 ? I want revert 1~10 version at any time !
thanks !
Hi imacrl,
Thanks for your asking.
Based on your description, this could be implemented by using command line.
First, use "cd" to change directory to the path of local repo.
and then use the command line below, switch to specific version:
git checkout <commit id>go back to master branch:
git checkout masterHope it helps.
Best regards,
Fletcher
这篇关于Git Repo问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!