6

I was trying to checkout single file from Github. After following this thread I tried

git archive --format=tar --remote=ssh://git@github.com:user/project.git HEAD:README.md

I get the following error

fatal: The remote end hung up unexpectedly

Edit: I tried getting file from raw by getting head from git ls-remote url. Then using this head I got the file using wget. But I would like to know how to do it using git commands.

Community
  • 1
  • 1
iLoveCamelCase
  • 450
  • 10
  • 21

1 Answers1

6

Answer from github docs on Can I archive a repository?

GitHub does not provide archiving.

If you want to consider a workaround, you can emulate archives locally by fully cloning the repository to a local machine. This will make you responsible for your own backups.

KyleMit
  • 30,350
  • 66
  • 462
  • 664
fluency03
  • 2,637
  • 7
  • 32
  • 62