1

On my git, I have a file called b.txt

On my local machine, I do not have this file.

I tried "git pull" to retrieve the file from git and place it into the directory of my local machine, but it says: Already up-to-date.

How do I retrieve the file without physically downloading it and placing it into my folder?

Thanks.

Rhs
  • 3,188
  • 12
  • 46
  • 84
  • 3
    Is b.txt checked in to the remote repository? Is your local repo tracking the branch to which it's checked in? – Andy Ross Jun 22 '12 at 04:57

1 Answers1

2

Check if you are in a detached head mode: see "Why did git detach my head?"

That would:

  • make any git pull null ("already up-to-date")
  • not restore your file if you had deleted locally

Note that you can search for the branches containing that file ("How can I search Git branches for a file or directory?"), and look for a deleted file ("Git: How to search for a deleted file on the project history?")

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250