I'm totally new to Git, so I figured I'll have more luck with EGit since I'm using Eclipse PDT. I'm the only programmer on the project. Here's what I'm doing right now:
What I would like to do is: ... 3. Commit changes 4. Push changed files (those I have dragged to Staged Changes) to the production server
So, this looks like very simple request. I don't want Git installed on the server, .git folder on the server etc. I just want to push new and changed files to the server, overriding those that are already on the server. I suppose this is possible, because when I right click the project and go to Team > Remote > Push..., there is a sftp option for the Protocol.
How can I achieve this? What would the input on the form I've mentioned (Team > Remote > Push...) look like? Or am I wrong, and I must install Git on the server?
Can EGit be used as SFTP client?
My only knowledge of Git is from this tutorial: http://www.vogella.com/articles/EGit/article.html. I've searched StackOverflow, but every topic is way to "Git specific" and way beyond my knowledge, so I don't understand most of it.
Thanks in advance.
I'm not sure if it will work but maybe you can use export feature (File->export->Remote System->Remote file system). I think to use this feature you have to install RSE (Remote System Explorer). This should export clean project, without .git folder.
The sftp protocol you see is just a protocol for git to connect to another computer having a git repository. So no luck for that.
You cannot achieve that workflow with only a git command. When creating a git server, called a bare repository, the layout on the filesystem does not reflect the files of your project but git's internals. So when you push your changes to the bare repository, you indeed send the files to the it but in order to "see" those files, you need to clone it.
The easiest way to do step 3 would be to create a script to upload your files using ftp, instead of doing the procedure manually. So no git bare repository on the server is needed.
There are also other nice workflows involving installing git on the server FYI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With