0

is it possible to download files from a remote server running git-daemon?

or how to download files from git:// server like downloading files using curl from http:// server?

the server is running this command:

/usr/bin/git daemon --reuseaddr --port=1234 --base-path=/home/user1/ --export-all
geek175
  • 127
  • 1
  • 7

1 Answers1

1

You can download objects, using the Git protocol. Objects are not files: some objects are commit objects, some objects are tree objects, and some objects are blob objects, and if you put all three of these together into a database, you can use that to extract files. But once you write code to do this, you're implementing git clone or—best case—git archive, so why not use those directly?

torek
  • 448,244
  • 59
  • 642
  • 775
  • my purpose is to download some untracked files in the working directory without installing an ftp or http server – geek175 Aug 30 '22 at 07:58
  • Untracked files aren't stored in Git. You cannot get those using Git, which only works with committed stuff, since Git is about commits (not files). – torek Aug 30 '22 at 07:59