git pull from remote… can I pull a specific commit? [duplicate]

喜你入骨 提交于 2019-12-22 09:01:33

问题


I create an empty new repository locally, I add a remote repository. Now I want to get a specific commit from the remote repository without downloading the whole remote repository with all its branches!

How do I do that?


回答1:


Answer is

git fetch origin 96de5297df870:refs/remotes/origin/D-commit

See Retrieve specific commit from a remote Git repository



来源:https://stackoverflow.com/questions/16795813/git-pull-from-remote-can-i-pull-a-specific-commit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!