0

Question: What are some recommended ways of storing independent release versions of an eclipse project in a Git (EGit) repository?

Problem: I have been creating a new eclipse (python or 'pydev') project every time I want to distinguish it as a new release (so my projects are project_0-0-1, project_0-0-2, ..., project_9-9-9). I'm becoming suspicious that git may be more sophisticated than I think (and there are easier and more organized ways of such storage between release versions. Are there?

Details: I'm specifically interested in how to set this up using Eclipse egit. Would be nice if an answer included a short "how-to" (what buttons to click in the gui). I'm pretty good with egit but a far cry from anything labeled as "proficient". Also, I'm just looking for advice mostly - any ideas are kindly appreciated.

Research:

I see some people have hinted git really isn't meant for this (it is version control not project management software):

Versioning and release management with multiple products with shared code base

Otherwise, would I just store different versions in branches? This is tempting but scary if I were to ever click "merge" by accident (maybe that's easily reversible though). I think that's what the links below are suggesting:

Branch/master tag revision increments using Git

Git tag release version?

Community
  • 1
  • 1
ecoe
  • 4,994
  • 7
  • 54
  • 72

1 Answers1

1

You should use git branch, branching is easy and painless in Git. You probably used to use CVS/SVN? where branching is complicated and terrible. You can always git checkout any past commits (Thus 'revert' the working directory to any state in the past)

When your software reach a stable state, where you want to mark it as a release, just add a tag to the commit (e.g. v1.3). Then you can switch to that release by git checkout v1.3

Eclipse EGit isn't the best GUI. I suggest using a software called SourceTree. It provides a good visualization of the Git commit graph and also very easy to use. The two should not have any conflict, you can use both. (Though I recommend learning the command line git :) ) Hope this helps.

Jason Leung
  • 3,819
  • 3
  • 16
  • 10
  • in that case the version tag corresponds for all projects in that repo? thanks! – ecoe Sep 05 '13 at 21:12
  • I guess a follow up question to my first comment is: are projects usually separated into separate repos (where tagging can then be used for the whole repo commit)? What about when you have tons of little projects and some have dependencies? This is why I've fallen into the routine of creating a new project every time I release a new version - so that older projects can still reference the older version. – ecoe Sep 05 '13 at 22:28