Reputation: 5713
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?
Upvotes: 3
Views: 1390
Reputation: 321
There is much value in being able to edit files remotely and there is much value in being able to version control your files in git. Currently I have the same situation. My "rserver" however, is a Puppet master. I'm editing the files through RSE on the Puppet master with my local PC in Eclipse. There's a lot of value in editing the files directly on the Puppet master, trying out the change and if it doesn't work continuing to modify the files. Having to then ssh into the server just to do git actions is dumb. Having a local git clone that you have to git add, commit, push, then go to the server and git pull is even more dumb. Eclipse should allow you to do git actions through RSE.
Upvotes: 0
Reputation: 15560
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 remote
s of your local repository, so then you can decide to whether of both to push changes to.
Upvotes: 2