Home > Blockchain >  Visual Studio Code using SSH to remote server - how to sync code base with github?
Visual Studio Code using SSH to remote server - how to sync code base with github?

Time:11-28

I have searched for a solution. No luck.

I'm using VSC on MacOS. The HTML and Python code is on an Azure VM. VSC remote connection works just fine. Feels like a local development experience with all the fancy VSC features. However, I cannot configure sync to github. This cost me a day's development when I made a mistake.

Requirement: Sync/push changes on the remote server to github.

Q1: If what I want is possible, how can I set it up? Q2: If what I want is not possible, what is a better way to solve the problem?

Thanks, Alan.

CodePudding user response:

It depends on what you mean by "sync". On the push side, as mentioned in "How to synchronize GitHub and Azure DevOps repository?", you might consider an Azure pipeline on your Azure DevOps project, assuming your Azure VM does push to said DevOps project.

If your Git repository (on that Azure VM) is local, all you would need to do is to add the GitHub URL as a remote, and from VSCode command line (through Remote SSH plugin), do the push directly.

  • Related