Search code examples
eclipsegitgithubegit

manage git clone on remote server with eclipse


I'm new to git and github and I have a question about the git plugin for eclipse Egit.

I have made a clone from my github repository to a remote server (other than github) which I will call 'rserver' for the ease. Now I am editing the files in my repository on 'rserver' locally from my computer with eclipse (and the RSE plugin) but when I want to do any git actions like committing the changes I made, I do that directly on the 'rserver' (command line). Now I would like to be able to commit changes etc. with eclipse and (what I presume to be the best option) the egit plugin. Since all code needs to remain on the 'rserver' to be functional as a program, there is no point of making another local clone of my github repository. But all options I've tried with egit seem to do exactly that.

Is it possible to manage all git actions between 'rserver' and github from my local Eclipse SDK (other then using the terminal in eclipse)? And if so, then how?


Solution

  • git clones repos, meaning they contain the same objects.

    I don't think there's a way to work on a remote repo, but you should git clone your rserver repository locally, work and commit there (this using eclipse), and when you want to upload your code to rserver or github, you just push your changes there.

    When you git push, you make the remote branch point to the same commit your local branch points, uploading any remote-missing object.

    Probably you will want to add both remote repostiories (rserver and github) as remotes of your local repository, so then you can decide to whether of both to push changes to.