First of all - I'm new to git. Now, I have a project using git and github. I have 2 machines at home and 1 at work. I can push and pull from remote while at home, but at work we have some extreme proxy & firewall. I tried various solutions and none of them worked. I tried:
http://help.github.com/firewalls-and-proxies/
but smart http/https doesn't work for me.
I then tried: http://blog.codeslower.com/2008/8/Using-PuTTY-and-SSL-to-securely-access-GitHub-reposito开发者_StackOverflow社区ries-via-SSH Still no fun. Can't even install cygwin from behind the proxy (it needs to download packages). Frankly, I don't care that much and I don't have more time to spend on this.So, the question is: can I just copy the work repo and take it home and then merge it into my home repo (and then push it to the remote)? Obviously I wouldn't want to lose any data in the process.
Any ideas? Much appreciated.
DamoYou have a couple of options:
You copy the work-repo and bring it home on a usb-drive or using email and there you push to remote and pull from remote on your home-repo.
You keep two copies of your remote-repo, one on a usb-drive and the other on github. When your at work you push and pull from the usb-drive and when your at home you push and pull to both github and the usb-drive.
You keep one local repo which resides on the usb-drive and you work on this one at both home and work. You just only push to github from home. This way your code at work is the same as the one you have at home.
You can just do a plain copy of a repo and put it somewhere else (be sure to take the whole repo starting from the base directory and including the .git
directory obviously). It will "just work" - you'll be able to work with the copied repo just as if you had created it there in the first place.
Do not unpack the copy over your existing repo though, that would mess things up (probably pretty badly). You'll have two repos on your home machine, and can do pull/push/merge/whatever to/from your remote repository (or between your to local repos actually) using the usual git commands.
(I'd be weary of doing this from a Windows machine to a Linux or MacOS machine though.)
精彩评论