2

I'm having trouble with git on Windows. I've lost some directories, and others are listed as untracked in git even though they've been part of the repo.

One directory literally does not exist on my machine, but it exists in origin/master. However, running git pull origin master yields "Already up-to-date." And git reset --hard HEAD doesn't change anything. My HEAD is the same as the origin's HEAD.

How do I get my directories back into my local repository? Checking out earlier commits still doesn't restore these folders. Nor does git checkout origin/master. I've tried creating the directory myself and git adding it, but the change doesn't show up in git status.

I have no .gitignore file.

mgiuffrida
  • 3,299
  • 1
  • 26
  • 27

1 Answers1

1

Make sure you are in a branch before attempting any pull:

git branch -avv
git checkout master

An "Already up-to-date." generally means you are in a detached HEAD.

You can try also to clone again your repo and check if those folders are indeed there in the new local clone

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thnaks for the suggestions. I've cloned the repo in a new location and the folders I'm expecting are all there. But in the original repo I'm definitely on branch master. – mgiuffrida Jan 03 '14 at 05:50
  • @eli any chance you could report your modifications from the first repo to the new clone? You could then add and commit there. – VonC Jan 03 '14 at 05:54