50. Placing your git repository
Goals
- To learn how to configure a git server for sharing repos.
There are different ways to share a git repository on the network. Here's the quickest way.
01 Run git server
Run:
# (From the work directory) git daemon --verbose --export-all --base-path=.
Now, go to your working directory in a separate terminal window.
Run:
# (From the work directory) git clone git://localhost/hello.git network_hello cd network_hello ls
You will find a copy of the hello project.
02 Sending to Git Daemon
If you want to allow push to the repository Git Daemon, add --enable=receive-pack
tag to git daemon command. Be attentive, this server does not perform authentication, so anyone can push changes to your repository.