Home > Enterprise >  How can I open git repository in remote linux desktop with GitExtensions
How can I open git repository in remote linux desktop with GitExtensions

Time:10-12

Currently I have my git repository in a remote linux VM where I do my developments (my IDE on local desktop opens the remote repository via ssh). I am wondering if I can open this git repository through GitExtension UI from my local desktop?

CodePudding user response:

GitExtensions is a standalone UI tool (with possible integration to Windows Explorer or Visual Studio Code).

If you are using VSCode remote SSH to develop remotely, that means you have an SSH access: you can use the same VSCode to develop locally after cloning the repository, using its SSH URL remoteUser@remoteServer:/path/to/remote/repository.git

It is best to create a bare repository on the server side (hence /path/to/remote/repository.git, with the .git extension traditionally referencing a bare repository), with a post-receive hook to update files from your actual repository.

That way, you can clone locally that bare repository, and push back to it.

CodePudding user response:

Git is a distributed source management system. This means that you can have many clones which can be located anywhere.

The remote VM can act as a source of truth and contain the main trunk. In this case it makes sense to make that clone as the bare repo. Locally you should clone that, and work against your local clone - i.e., create branches, push, fetch, etc. When you're done with your development - you push to the main trunk located on the remote VM.

  • Related