Push changes from Eclipse PDT to production server with EGit (FTP like)

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:

  1. I have two identical copies of website on my local machine and server
  2. I’m making changes to the local version, testing, debugging etc.
  3. When I’m satisfied with the code, I open FileZilla and upload each and every file I have changed

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

  • Ignoring Eclipse project files in SVN project
  • How to manually trigger DLTK indexing in Eclipse PDT for a PHP project
  • Don't show .svn folders in Eclipse
  • 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.

  • Git: auto pull from repository?
  • Is it possible to mark a git commit as work-in-progress?
  • How can I merge finished work patch instead of its whole history into test branch?
  • Git-windows case sensitive file names not handled properly
  • How to get the current/active branch with LibGit2Sharp?
  • How can I find all the commits that have more than one parent in a Git repository?
  • 2 Solutions collect form web for “Push changes from Eclipse PDT to production server with EGit (FTP like)”

    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.

    Git Baby is a git and github fan, let's start git clone.