I have git 开发者_JS百科on my laptop and on my PC. I just want to sync (push/pull) them without using any other server. Both of my laptop and my PC uses Windows 7. Is there any simple solution for me? I can not go through guides like this http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
because they to install and configure many things.
Regards,
I use dropbox for this task. My dropbox contains the git repositories, which are cloned to each host. Then you could easily push and pull against it.
If you try this approach you have to create a bare repository in your dropbox. Add this as remote to your local one.
See also Using Git and Dropbox together effectively?
You can use the local protocol (i.e. a shared network path between your two PC).
I recommend pushing to:
- a bare repo (you set one bare repo on each side)
- actually a bundle (which is a bare repo represented as one file)
Then you can use dropbox to save and keep that bundle in sync if you want: it is much easier to backup one file than a all .git
content.
WindowsGit.com offers a $9 installer for setting up a git server that is definitely faint-hearted friendly, unlike Mr. Davis's excellent tutorial ;) It takes under five minutes, and all the steps fit in a half-page of instructions. It's hard to mess up, and has support.
It sets up a dedicated SSH server which only allows acess via the public keys you provide. It has an isolated copy of Git so it won't interfere with whatever else you have installed.
It's fast, clean, secure. It's GPL-licensed, but the binaries cost $9, which pays for some of the the hosting, support, and development costs.
I'm the webmaster for the site, so I'm obviously biased. I'd love to hear about any alternative or similar products out there, though.
精彩评论