git push windows to windows
I currently have a setup where on my windows machine with cygwin I added my linux server as a remote origin where I can then push my changes as I have my SSH keys configured.
git add remote origin ip@path.git
git push origin
开发者_如何学JAVAHow would I do this to my windows machine is it as simple as hosting an SSH server and if so which do you recommend?
It sounds as if you want be able to push to the repository on a Windows machine, so git daemon
and the git protocol won't be enough for you. If you need to be able to push to the repository you're left with these options:
- Run an SSH server on your Windows box. There are various guides you can find for doing this with Cygwin, e.g. this one or this one. An alternative is to use mSysGit, in which case you could chase the references in this Stack Overflow question: Setup a Git server with msysgit on Windows
- Use git's "Smart HTTP" protocol - sdorra's answer implies that SCM-manager lets you do this, but I've no experience of that. However, Smart HTTP is essentially just provided by a binary called
git-http-backend
that you can use over CGI. This binary is distributed in mSysGit, so you could set that up with a web server - for example, there's a tutorial on doing that with Apache here
Another alternative is to mount your remote computer as a local drive and add it as a remote using the file:
protocol.
You can use git daemon. Hosting Git Repository in Windows
Or you could use SCM-Manager and do the push or pull over http.
You could use Gitblit, an open-source, integrated, pure Java Git server, viewer, and repository manager for small workgroups. It works well on Windows and includes tools to run as a Windows service.
精彩评论