0

I have a Git repository hosted on our company's servers. With a laptop connected to the company's network I do have access to those servers, but they are inaccessible from other locations, including the EC2 instance I'm using for some numerical computations.

This presumably means I can't keep a versioned copy of my code on the EC2 instance, and that whenever I change something in my code and then wish to execute it I have to scp it to the instance.

A possible solution is the use of hooks, but that will only give the EC2 instance a copy of the latest commit, on whatever branch that is, and nothing else. Furthermore, it can easily produce scenarios where the code gets out of sync.

Is there any safer/smarter way to manage code in this setting?

imergodic
  • 9
  • 1
  • I don't understand the problem. Presumably your laptop has access to both the company servers and the EC2 instance, so you can pull from the former and push to the latter to keep things in sync? In what situation are you able to use `scp` but unable to use `git` to transfer your changes? – larsks Mar 29 '17 at 12:52
  • @larsks Yes, that is a plausible solution, although I was told (by our sysadmins) that we should only keep remote repositories on our servers. I should have specified that, sorry! – imergodic Mar 29 '17 at 13:03

0 Answers0