Aptana Studio And Git/Github

Aptana studia is a plugin to Eclipse, which contains many useful modules (like PyDev) and amongst many also GIT module. However this module is different than EGit ( and EGit cannot be installed because it conflicts with Aptana Git)so manual on Github is not applicable. So how does it work? On my recent project I’ve tried to use it  and here is quick guide how to  create project and push it to Github.

  1. Create project on GITHub. Register your SSH key with project (If you do not know how, surely there is a tutorial on Github).
  2. In Eclipse in Navigator or Project Explorer right click on project folder and select Team/Share Project …
  3. Select Aptana Git and click Next
  4. Select proposed location for GIT repository, click Create and Finish
  5. Select files you do not want to include in version control (temp files, test data, etc.) in Navigator or Project Explorer, right click and select Team/ Add to .gitignore
  6. Select project folder, right click and select Team/Commit …
  7. In dialog choose .gitignore file – move it to right  (Staged Changes)  and click Commit. This has to be done because Aptana plugin will remove unwanted files from unstaged files only after .gitignore is committed.
  8. Now click on project folder again, right click and select Team/Commit … and commit all remaining files.
  9. Click on the project folder, then right click and select Team/Remotes/Add…
  10. In dialog fill Remote Name, Remote URI (something like git@github.com:your_name/your_project.git) and click OK.
  11. Now you need to push project to remote –  first time you should do it from terminal – for two reasons – first to associate local branch with remote branch (I did not found any way how to do it in Eclipse), second reason is that for first time git will require to confirm authenticity of remote key – if process is run from Eclipse, it gets stuck.  This is command to push:
    cd your_project_directory
    git push --set-upstream your_remote_name

    You may need to pull remove branch first if you already have some files there:

    git pull your_remote_name
  12. From now on you can work normally work with Aptana Git – commit all changes you do, and push changes to Github – via context menu Team/Push

Leave a Reply

Your email address will not be published. Required fields are marked *