Reputation: 10233
I'm cloning a Git repository by copying the ".git" directory. If I run "git checkout" in that directory it gets me the contents of HEAD. How do I get the staged changes from the original repository? Are they not stored in ".git" and if so is the only way to copy the source files then?
Upvotes: 2
Views: 558
Reputation: 48418
If you run git status
you should see that the staged changes are still in the index. If that works, go ahead and run:
git checkout -- .
That should reset the the current working directory to match what you have staged.
For more information, see "How do I discard unstaged changes in Git?".
Upvotes: 3