Git Flow, Top Eclipse Mars Feature #3

Git Flow, Top Eclipse Mars Feature #3

After 12 months of work, almost 80 projects, 380 committers, 352 contributors, and 65 million lines of code, we’ve finally arrived at Eclipse release week. Eclipse will ship on Wednesday June 24th, and that means we’ve arrived at the Top 3 Features in my annual Eclipse Top 10 List.

Eclipse has shipped with Git support since 2011. While the tool has improved significantly over the years, many developers would still drop to the command line for custom tasks. One such example is the use of Git Flow. Git Flow is a branching model that places meaning on different branches. Each feature is developed in its own branch, and merged into a standard ‘develop’ branch. To perform a release, the ‘develop’ branch is merged into master. There are tools to help simplify this process.

With Eclipse Mars, there is now support for Git Flow directly from Eclipse.

From the repository view you can initialize ‘Git Flow’.

Screen Shot 2015-06-21 at 11.55.47 AM

Once initialized, you begin working on a new feature directly from the Git context menu. This will prompt you for the name of the feature, and automatically create a branch.

Screen Shot 2015-06-21 at 11.58.09 AM

At any time you can checkout any other feature branch to easily move between tasks.

Screen Shot 2015-06-21 at 12.03.29 PM

And once a feature is completed, simply marking it as such will merge it into the correct branch. There are also release tools available to merge the development branch into the master branch; and finally, hot-fixes can be initiated and applied to the master branch through the context menu.

Screen Shot 2015-06-22 at 12.41.01 AM

In addition to Git Flow integration, the Git Tools for Eclipse saw a number of enhancements this past year. If a file is in conflict, the staging view will now show options to ‘Checkout Ours’ or ‘Checkout Theirs’. This allows you to easily restore the file to the state it was in before the conflict.

Screen Shot 2015-06-21 at 9.29.21 AM

Some new features were added to interactive rebase view and history view in September 2014 (EGit version 3.5) as well as improved stash support. A stashed commit can now be applied directly from the commit viewer.


For a complete list of what’s new in the Eclipse Git Tools for Eclipse, checkout the New & Noteworthy, and for more Eclipse Tips & Tricks, follow me on Twitter.

  • Trinity
    Posted at 01:52, 2015-06-25

    For some reason, I can’t find the Git Flow button?! I’ve updated just now to Mars :/

  • Peter Boughton
    Posted at 12:59, 2015-07-27

    The Gitflow support does not actually follow git-flow correctly – it doesn’t add –no-ff when merging.

    Anyone know if it’s fixable (i.e. are the commands used in a config file somewhere?)

  • Peter Boughton
    Posted at 14:26, 2015-07-27

    Looking into it further, the claimed gitflow support is NOT gitflow – it doesn’t merge correctly, it doesn’t tag correctly, it doesn’t even branch correctly.

    Issues raised in Bugzilla. Hopefully it doesn’t take long for them to be fixed – I’d go do it myself if there weren’t so many hoops to jump through. :/

  • Rafael
    Posted at 11:47, 2015-08-03

    I’ve just installed Eclipse Mars, but there’s no “Init Git Flow” feature available. I’ve created a test empty project and initialized Git repository with it. Then I opened menu in Git Repository view window, but there’s no such menu item. Look at the picture:

    How can I fix that?

  • Rafael
    Posted at 11:54, 2015-08-03

    Fixed, I did not read previous comments before posting my question. It is required to install “Eclipse Git Team Provider – Gitflow support” via Help – Install new software and using “Mars update site”