Community
Participate
Working Groups
After rebasing a local feature branch (e.g. to address review comments), Git Flow -> Publish Feature doesn't have any effect anymore. In contrast a regular push still works. Steps to reproduce: 1. Ensure Git Flow has been initialised. 2. Create a feature branch using right click on repository -> Git Flow -> Start Feature. 3. Make a change and commit it. 4. Push feature branch using right click on repository -> Git Flow -> Publish Feature. 5. Make another change (e.g. fixing a typo in the previous change) and amend the previous commit. 6. Try to push updated (rebased) feature branch using Git Flow -> Publish Feature. 7. Observe that nothing happens, not even an error message. 8. Push the updated feature branch using right click on repository -> Push Branch '<branch name>', ensure "Force overwrite branch in remote if it exists and has diverged" is checked, Next, Finish. 9. Observe that the remote branch is updated as expected. This happens with "Eclipse Git Team Provider - Gitflow support 4.3.0.201604071810-r" inside Progress Developer Studio 4.3 (Progress OpenEdge 11.6.1), based on Eclipse Platform 4.3.1.M20130911-1000.
Thanks for reporting this. It looks like your workflow requires you to force push commits regularly. I'm not sure though if 'publish' should support this. It doesn't seem like publish was originially intended to support a 'force' argument [1], and a quick look at the code of a more advanced variant of Gitflow [2] doesn't indicate that this is common practice. But I might be wrong on this. It is probably reasonable to show an error in such a case, though, so users don't get the impression the operation was successful. [1] https://github.com/nvie/gitflow/wiki/Command-Line-Arguments [2] https://github.com/petervanderdoes/gitflow-avh/blob/develop/git-flow-feature
New Gerrit change created: https://git.eclipse.org/r/155112
For reference, this is what gitflow AVH would display on publish when the local branch is both, behind the remote: ! [rejected] feature/a -> feature/a (non-fast-forward) error: failed to push some refs to 'gitflow-sandbox'
Gerrit change https://git.eclipse.org/r/155112 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=540c1fff36c96665b8cfbbfde6bb8a58d5533866
@Sascha > 7. Observe that nothing happens, not even an error message. This is fixed. You can try it for example using the nightly build that's listed on the Marketplace. > 8. Push the updated feature branch using right click on repository -> Push Branch '<branch name>', ensure "Force overwrite branch in remote if it exists and has diverged" is checked, Next, Finish. I'm all for allowing force-push workflows, however, AVH Gitflow does not support this yet. I'd suggest to continue the discussion here: https://github.com/petervanderdoes/gitflow-avh/issues/401