0

I have a problem that I suspect may not have a solution, but no harm in asking

My firm uses Git Enterprise hosted on an internal server. Whilst my laptop is connected to the firm's network I have access to this remote repository, but when I am off the network, I do not. I can only work locally.

Separate to this, I have a virtualised computer hosted on our network. This computer has access to Git Enterprise AND I can log into it from my laptop anywhere, both whilst on or off the network.

My situation is this. As I write this question, I am at home and off the network. However I need to push my local branch up to Git Enterprise. Is there anyway I can do this - maybe using my virtualised PC and possibly even a personal GitHub account? My initial thought was to somehow push my local branch up to a private repo on my personal GitHub account, access my virtual PC to download that branch, then from there push it up to Git Enterprise. The trouble is, I wouldn't know where to start. I don't want to damage other branches either on my GitHub or Git Enterprise repos.

Can this be done?

Thanks

Typhoon101
  • 2,063
  • 8
  • 32
  • 49
  • How do you access the virtual PC? If you have ssh access, you can just do something like `git remote add virtual-pc username@virtualpchostname:/path/to/repo/on/virtual/pc` followed by `git push virtual-pc my-branch`. Note that this won't update the remote working copy though -- you'll need to do `git checkout my-branch` on the virtual PC to bring your files up to date. – Thomas Jun 15 '18 at 11:25
  • the virtualised PC is accessed through a browser and uses Citrix Receiver. No SSH unfortunately – Typhoon101 Jun 15 '18 at 11:43
  • Possible duplicate of [How can I export Git change sets from one repository to another via sneaker net (external files)?](https://stackoverflow.com/questions/49101425/how-can-i-export-git-change-sets-from-one-repository-to-another-via-sneaker-net) – phd Jun 15 '18 at 11:50

1 Answers1

2

on local computer you need create diff patch git diff branch origin/master > patch

on the next computer you need to apply this branch: git apply patch

Ivan Sheihets
  • 802
  • 8
  • 17