How can I make my local repository available for git-pull? How can I make my local repository available for git-pull? git git

How can I make my local repository available for git-pull?


Five possibilities exist to set up a repository for pull from:

  • local filesystem: git clone /path/to/repo or git clone file://path/to/repo. Least work if you have networked filesystem, but not very efficient use of network. (This is almost exactly solution proposed by Joakim Elofsson)
  • HTTP protocols: git clone http://example.com/repo. You need any web server, and you also need to run (perhaps automatically, from a hook) git-update-server-info to generate information required for fetching/pulling via "dumb" protocols.
  • SSH: git clone ssh://example.com/srv/git/repo or git clone example.com:/srv/git/repo. You need to setup SSH server (SSH daemon), and have SSH installed on client (e.g. PuTTY on MS Windows).
  • git protocol: git clone git://example.com/repo. You need to run git-daemon on server; see documentation for details (you can run it as standalone process only for fetching, not necessary run as service). git-daemon is a part of git.
  • bundle: You generate bundle on server using git-bundle command, transfer it to a client machine in any way (even via USB), and clone using git clone file.bndl (if clone does not work, you can do "git init", "git remote add" and "git fetch").

What you are missing in your example is probably running git-daemon on server. That, or misconfiguring git-daemon.

Unfortunately I cannot help you with running git-daemon as service on MS Windows. There is nothing in announcement for last version of msysGit about git-daemon not working, though.


In addition to Jakub Narębski's answers, there is anotherway, more in-line with your original question. You could clone from github like you usually do, then when you want to perform a one-off pull from your local repo, just do this:

git pull /path/to/repo master

(instead of master you can put any branch name.)


If you have a path like

C:\Project\

and you did git init already, so you also have a folder

C:\Project\.git\

You now make a new folder

C:\.git\

Go into that folder and run git clone --bare ..\Project (bare is important),
go back to your C:\Project\ folder and do a git remote add-url local ..\.git\Project.
Now you just do git add -A, git commit -m "HelloWorld" and git push local master.

You may share the Project folder, connect it to Z: and do git clone Z:\Project - you can use now git pull origin master and git push origin master to push/pull changes from one computer to another.