Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sharing your Git repository using Git daemon (for pull & push)
- 1. In a git repository run the following command to share it in read-only mode (pull only):
- git daemon --export-all
- and you can then connect to it from a remote machine:
- git clone git://yourmachine/path/to/repo
- or
- git pull git://yourmachine/path/to/repo
- or
- git ls-remote git://yourmachine/path/to/repo
- 2. In order to be able to pushing to your local repository from a remote machine you need to enable receive-pack:
- git daemon --export-all --enable=receive-pack
- then you can push like this:
- git push git://yourmachine/path/to/repo
- Note: you cannot push to a checked out branch! (just switch the branch using git checkout on the destination machine before trying to push to it)
Add Comment
Please, Sign In to add comment