1

Possible Duplicate:
Partial clone with Git and Mercurial

I switched into the specific directory into which I'd like my repo file to be copied into, and then tried the following:

    git clone git@github.com:path/to/file.java

but it's giving me ERROR: repository not found

Can anyone tell me what's going on, and what's the right thing to do? (a little background doesn't hurt!)

Community
  • 1
  • 1
Programmer
  • 123
  • 5

2 Answers2

1

You may want to look into something called a sparse checkout which was implemented in Git 1.7 I believe. Before that I don't think git allowed you to do so although on github you can always copy individual files from their web interface by opening the file and saving it.

Jesus Ramos
  • 22,562
  • 9
  • 54
  • 86
0

git works at the repository level, not at the file level (unlike CVS/SVN).

As a result, if you clone you usually clone the whole repo - and a change is tracked as a repository content change - not a simple file change.

ptyx
  • 3,984
  • 1
  • 18
  • 21