开发者

Getting files from a Git repository

This is a rather embarrassing question, but I am rather pressed for time, and can get on with other work while someone far more knowledgeable in Git than me could answer it in seconds.

I've just done a fetch from a remote repo, but I have no working copy files. I'm using Git GUI on Windows, and I can visualise the history, and at some point I could see the file structure of the solution, but I can't find how again. Most operations require me to select a revis开发者_如何学运维ion, but none are available in the dropdown, and HEAD is not a valid revision for some reason. How do I get the actual source files I need?


The idea is to use a commit to:

  • checkout it (which will create the working tree)
  • create a local branch

See How can I switch my git repository to a particular commit:

git checkout -b new_branch 6e559cb

That commit would be the "start point revision" mentioned by Adrian Shum in his answer.


Then please checkout (git checkout) to have your working copy.

You can provide the start point revision to checkout.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜