lab 50 Hosting your Git Repositories
NOTE: This step and the next one is optional since we use a service like Github to host our sahred repositories.
Goals
- Learn how to setup git server for sharing repositories.
There are many ways to share git repositories over the network. Here is a quick and dirty way.
Start up the git server 01
Execute:
# (From the work directory) git daemon --verbose --export-all --base-path=.
Now, in a separate terminal window, go to your work directory
Execute:
# (From the work directory) git clone git://localhost/hello.git network_hello cd network_hello ls
You should see a copy of hello project.
Pushing to the Git Daemon 02
If you want to push to the git daemon repository, add --enable=receive-pack
to the git daemon command. Be careful because there is no authentication on this server, anyone could push to your repository.