Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348610 - Extend EGit to allow use of git-flow
Summary: Extend EGit to allow use of git-flow
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Gitflow (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement with 38 votes (vote)
Target Milestone: 4.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 12:56 EDT by George Gastaldi CLA
Modified: 2015-06-26 16:08 EDT (History)
30 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Gastaldi CLA 2011-06-07 12:56:44 EDT
Build Identifier: 

It would be nice if EGit added a "Enable Git Flow" extension on GIT Projects so that it would be easier to use git-flow extensions.

More info:

http://nvie.com/posts/a-successful-git-branching-model/ - Explanation of the workflow
http://nvie.com/posts/a-git-flow-screencast/ - Screencast showing it in action
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ - Usage of the workflow in blog post form
https://github.com/nvie/gitflow - Repo of the git flow extension, also contains wiki pages about it.


Reproducible: Always
Comment 1 George Gastaldi CLA 2011-06-07 12:58:00 EDT
There is also an issue related to this in JBoss Tools: 

https://issues.jboss.org/browse/JBIDE-9080
Comment 2 Matthias Sohn CLA 2011-06-29 05:24:49 EDT
this is an enhancement request
Comment 3 Kevin Sawicki CLA 2011-08-22 18:01:45 EDT
Do you see this as a set of menu extensions to start and finish the specific branch types?

Would a larger visualization of the branches and their relation to each other (perhaps using GEF or Zest) be useful as well?
Comment 4 George Gastaldi CLA 2011-08-22 18:02:44 EDT
That would be awesome !
Comment 5 Soren Mathiasen CLA 2012-08-31 04:47:36 EDT
+1
This would improve the quality of the plugin greatly !
Comment 6 Christian Pontesegger CLA 2012-11-26 06:38:48 EST
A visualization of features-under-development and available releases would be great (along with context menu support to switch there).

UI integration to start/stop features, releases, hotfixes would be needed to. I'd prefer to have this in a separate view.
Comment 7 Adib Saikali CLA 2013-01-06 21:16:00 EST
This feature would be fantastic and make egit much easier to use
Comment 8 Robert Barbey CLA 2013-08-15 10:39:39 EDT
I can second this request. Would be really great to see this happening.
Comment 9 Gerd Zanker CLA 2013-12-20 14:38:08 EST
bug309578 covers the most important parts of "git flow".
Comment 10 Nikolas Falco CLA 2015-04-08 10:00:05 EDT
Any news?
Comment 11 Max Hohenegger CLA 2015-04-14 17:24:23 EDT
I have been working on a Git Flow extension for EGit recently.
Thus far, I only implemented the features I need personally, but I think it got to a point where it has some advantages for others as well.
Most importantly it does not run into resource locking issues, as it sometimes happens when combining the command line tool with the Eclipse workspace refresh hooks.

Now, I hope to contribute this to EGit, so others can start contributing, and we can soon have a full Git Flow implementation in Eclipse!
I took care to write tests, add copyright headers and "sign off" on every commit, so I hope there is not too much in the way, given that a commiter finds the time to review it.

If you want to try the current state, here you go. But be sure to make a backup of your repository.
https://bintray.com/artifact/download/goliath/generic/org.eclipse.egit.repository-4.0.0-SNAPSHOT-luna.zip
The UI so far is rudimentary, and consists of two context menu contributions. One in the repository view, another one in the history view. I have plans to improve this, but ideas are welcome.

The sources are on GitHub:
https://github.com/Treehopper/egit
If you want to build it, this currently seems to be the way:
$ mvn clean install -Djgit-site=https://repo.eclipse.org/content/unzip/snapshots.unzip/org/eclipse/jgit/org.eclipse.jgit.repository/4.0.0-SNAPSHOT/org.eclipse.jgit.repository-4.0.0-SNAPSHOT.zip-unzip/
Comment 12 Matthias Sohn CLA 2015-04-14 19:40:33 EDT
great news, will give it a try soon

Looking forward that you contribute this to EGit, follow the contributor guide [1] to push your changes to Gerrit. Let us know on the mailing list if you need any help.

[1] https://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 13 Matthias Sohn CLA 2015-04-15 03:45:50 EDT
if you want your contributions to be shipped with 4.0 and Mars they should be in before Mars IP log review on May 22
Comment 14 Matthias Sohn CLA 2015-04-21 03:50:08 EDT
I tried your new feature (I don't use git-flow so far) and it already looks pretty good

I think in order to prevent polluting the menus for EGit users which don't use git-flow we should have a way to enable it globally or on some repositories, I propose we use a custom git config option to implement that. We already do that for enabling the Gerrit code review workflow. If there is a way to auto-detect that git-flow is used on a repository we could auto-enable git-flow menus on that repo.
Comment 15 Alexander Ustimenko CLA 2015-04-21 03:55:14 EDT
Yes, you can see in config and if there are these or such lines:

[gitflow "branch"]
	master = master
	develop = develop
[gitflow "prefix"]
	feature = feature/
	release = release/
	hotfix = hotfix/
	support = support/
	versiontag =


Another way is when repo has some common accepted branches, like: "master and develop" or at least one branch named "feature/...", "hotfix/..." or else.
Comment 16 Matthias Sohn CLA 2015-04-21 05:04:14 EDT
(In reply to Alexander Ustimenko from comment #15)
> Yes, you can see in config and if there are these or such lines:
> 
> [gitflow "branch"]
> 	master = master
> 	develop = develop
> [gitflow "prefix"]
> 	feature = feature/
> 	release = release/
> 	hotfix = hotfix/
> 	support = support/
> 	versiontag =

this is pretty explicit, so we should auto-enable git-flow menus if such entries are in the configuration of a repository

> Another way is when repo has some common accepted branches, like: "master
> and develop" or at least one branch named "feature/...", "hotfix/..." or
> else.

this is only a weak indicator
Comment 17 Max Hohenegger CLA 2015-04-21 19:58:16 EDT
(In reply to Matthias Sohn from comment #16)
> this is pretty explicit, so we should auto-enable git-flow menus if such
> entries are in the configuration of a repository
One command is still necessary though: "git flow init" to create said entries.
Global (de-)activation is not a good option I think because it is probably rather common to have both, git-flow and non-git-flow repositorys in EGit at the same time.

But there are some other possibilities. For example, entire separate views for git flow, or simply accessing all git flow features via quick access. I am sure others will contribute ideas as well, as soon as the core commands are complete and free from major bugs.
I am currently working on preparing for the review.
Comment 18 Matthias Sohn CLA 2015-04-22 03:30:12 EDT
I don't see a need to separate views for git-flow, I just want to avoid that users which don't use git-flow see the git-flow commands in prominent places at the top of EGit menus (we had similar discussions for the Gerrit menus). Hence this should be configurable.

Maybe we could use the following approach:
- show the git-flow menus on repositories which have any gitflow config entries
- always show the menu entry for "git-flow init" on repository nodes in the repositories view and maybe also at the bottom of the EGit team menu on projects
Comment 19 Max Hohenegger CLA 2015-04-22 03:55:50 EDT
(In reply to Matthias Sohn from comment #18)
> Maybe we could use the following approach:
> - show the git-flow menus on repositories which have any gitflow config
> entries
> - always show the menu entry for "git-flow init" on repository nodes in the
> repositories view and maybe also at the bottom of the EGit team menu on
> projects
I think I can make that work.
If there are multiple ways to access the git flow commands, I am also open to disabling the context menu entries via preferences. I don't think they are the best/quickest way to work with git flow anyway because I often run multiple git flow commands in sequence.
As Christian Pontesegger pointed out, having additional views for git flow might have some benefits. If that's what it's going to be in the end, there might be no need for the menu entry.
But, I don't have a strong opinion about any of that. :)
Comment 20 Matthias Sohn CLA 2015-04-22 04:25:49 EDT
(In reply to Max Hohenegger from comment #19)
> (In reply to Matthias Sohn from comment #18)
> > Maybe we could use the following approach:
> > - show the git-flow menus on repositories which have any gitflow config
> > entries
> > - always show the menu entry for "git-flow init" on repository nodes in the
> > repositories view and maybe also at the bottom of the EGit team menu on
> > projects
> I think I can make that work.

then I propose you start this way, it's probably less work than implementing a new view
and I think it's important to quickly get out a first implementation to get some usage to collect feedback from users

> If there are multiple ways to access the git flow commands, I am also open
> to disabling the context menu entries via preferences. I don't think they
> are the best/quickest way to work with git flow anyway because I often run
> multiple git flow commands in sequence.
> As Christian Pontesegger pointed out, having additional views for git flow
> might have some benefits. If that's what it's going to be in the end, there
> might be no need for the menu entry.

if it turns out a new git-flow view makes sense then of course add it
Comment 21 Max Hohenegger CLA 2015-04-30 06:48:01 EDT
Here is my contribution:
https://git.eclipse.org/r/#/c/46858/

Let me know if there is something you want changed!
Comment 22 Matthias Sohn CLA 2015-05-15 18:12:53 EDT
merged as http://git.eclipse.org/c/egit/egit.git/commit/?id=9904bd578ea60f3d28f38fec69af0456af805b12

with this change EGit now has basic support for git-flow, file new bugs for further enhancements of git-flow support
Comment 23 Matthias Sohn CLA 2015-05-15 18:14:27 EDT
I will create a new Bugzilla component for gitflow support in EGit as soon as webmaster has provisioned the corresponding inbox email address
Comment 24 David Belanger CLA 2015-06-26 09:55:48 EDT
Matthias and Max,

I'm currently using the stable build of the egit which has the gitFlow add-on (we're a git-flow shop).  In some cases it works and in other cases none of the options are available (even after the Init Git Flow).  I'd like to help you test this excellent new feature.  I've searched for a specific discussion group but I haven't seen one.  I did see that there is a gitFlow comp in Bugzilla.  Is that the only place for comments?
Comment 25 Matthias Sohn CLA 2015-06-26 10:09:31 EDT
You are very welcome helping us testing and providing feedback.

Send your comments to the egit-dev mailing list [1] or file bugs and enhancement requests for EGit / Gitflow here in Bugzilla. Note that in order to be able to post to the mailing list you first have to subscribe for this list. 

[1] https://dev.eclipse.org/mailman/listinfo/egit-dev
Comment 26 Max Hohenegger CLA 2015-06-26 10:22:52 EDT
@David, also have a look in the Gitflow component for existing bugs/enhancements:
https://bugs.eclipse.org/bugs/buglist.cgi?component=Gitflow&list_id=12101833&product=EGit&query_format=advanced