1

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 revision, 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?

ProfK
  • 49,207
  • 121
  • 399
  • 775
  • You'll probably want to get familiar with the command-line interface when using `git`. Could you update your question with the output of `git branch -a`? There is most likely a remote branch you want to check out locally, like in VonC's answer. – mpontillo Jul 08 '11 at 21:17

2 Answers2

1

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

You can provide the start point revision to checkout.

Adrian Shum
  • 38,812
  • 10
  • 83
  • 131
  • I don't know what you mean by *start point revision* but if I try a checkout without a revision I get "you are on a branch yet to be born". – ProfK Jul 08 '11 at 10:53
1

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I actually just came right doing a clone from the remote. Clone only appears as an option when you start Git GUI, I didn't see it anywhere inside the app. – ProfK Jul 08 '11 at 12:53
  • @ProfK: that's possible since I almost only use command-line interface with git, and not "git Gui". – VonC Jul 08 '11 at 13:18