0

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?

Zigzagoon
  • 787
  • 6
  • 16

2 Answers2

0

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • > GitExtensions is just a plugin for Windows Explorer or for visual Studio Code. That's very incorrect. Git Extensions is a standalone Windows app. – RussKie Oct 11 '22 at 12:37
  • @RussKie You are right, thank you for the feedback. I have edited the answer accordingly. – VonC Oct 11 '22 at 13:39
  • From my understanding, you are suggesting that I develop on my local desktop, then push changes to the linux vm instead of origin? Unfortunately, due to how the environment and internal tools, it would be extremely troublesome to develop locally (I would lose all IDE support and I won't be able to run tests locally). Therefore I would be more interested in doing developments directly on the linux vm, then just hopefully get the GitExtensions UI for my repository in the linux vm. – Zigzagoon Oct 11 '22 at 21:38
  • @Zigzagoon From what I understand, Git Extension does not have SSH support to visualize a repository on a remote server (again, through SSH). It does visualize a *local* repository on your *local* machine, hence the suggestion to develop locally. It is therefore not compatible with your request to use "the GitExtensions UI for my repository in the linux vm". – VonC Oct 11 '22 at 23:45
0

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.

RussKie
  • 1,630
  • 11
  • 20
  • Unfortunately, due to how the environment and internal tools, it would be extremely troublesome to develop locally (I would lose all IDE support and I won't be able to run tests locally). Therefore I would be more interested in doing developments directly on the linux vm, then just hopefully get the GitExtensions UI for my repository in the linux vm. – Zigzagoon Oct 11 '22 at 21:38
  • I'm having troubles appreciating why you would lose IDE support if you were to develop locally. Execution of tests locally or remotely (or the ability to execute) is a different kind of problem (IMO this is an indication that the developer setup should be improved), which may obviously be a consideration in your case. Anyhow, Git Extensions works with git repo accessible via paths Windows Explorer understands - be that a local paht (e.g., C:\MyRepo) or UNC paths (e.g., \\server\MyRepo). It also supports WSL. – RussKie Oct 13 '22 at 05:45