I was primarily on SVN and am now a Git newbie. I use "git svn" on a MacBook Pro to work with my SVN repository, but occasionally I have to work remotely when the only access I have to the office network is after ssh-ing to an intermediate Linux server and then to my Mac server within the office network that also has a copy of the git-svn repository. Port forwarding is disabled, so ssh tunneling from my MacBook Pro remotely to office SVN is not an option.
For now to when I am remote and want to get the latest code, I update my remote repository, dump the diff between the version I have on my MacBook Pro and the latest revision to a file, ftp it over to my MacBook Pro via the intermediate server, then patch the files in my local Git repository. I have somewhat automated the process using some bash/expect scripts, but I don't have revision comments and all the flexibility of using Git.
Is there a good way to dump the diffs, including all the revision information to a file, ftp it over and apply it to my local Git repository?
You want git bundle
.
Let's say abcd1234 is the latest commit you have in the repository on your laptop. On the machine that has the Git repository:
git bundle create myrepo.bundle abcd1234..master
Now copy it over to your laptop, and:
git pull /path/to/myrepo.bundle master
Of course, you may also want to convince IT to allow you to set up port forwarding, or just do it yourself by running netcat
on the intermediate machine.