Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] making push force more handy

On Tue, Jun 18, 2013 at 11:48 AM, André Dietisheim <adietish@xxxxxxxxxx> wrote:
Hi Matthias, Hi Tomasz

Thanks for your feedback!


On 06/17/2013 08:08 AM, Matthias Sohn wrote:
On Fri, Jun 14, 2013 at 3:38 PM, André Dietisheim <adietish@xxxxxxxxxx> wrote:
Hi

I'm currently looking into improve EGit here and there usability-wise (and in my daily job). We have master repos on github and each dev has its personal fork. We all work on topics-branches. Once the code is ready we rebase (or amend beforehad) and file a pull-request which then gets merged into the master repo.
The git staging view is just awesome, it allows commiting and pushing to my github fork in a single (button) click. That's even easier than on the cmd-line. Unfortunately when I amend, I have to push force to my fork which is not as handy.

* The git-staging view doesn't offer a force switch which could come very handy but could also be very dangerous. What are your thoughts?

yes, it's dangerous, we could add a force switch but it's default should be always off.
Maybe we should only offer it after fast forward failed.

Yes, good idea. I put 2 suggestions into my blog here: https://community.jboss.org/en/tools/blog/2013/06/18/how-to-use-eclipse-egit-with-github-in-jboss-tools
* a checkbox below the warning "your amended commit was already pushed..." in Git Staging View

I'd prefer this approach but would leave the checkbox unchecked to make clear that
the user has to take a conscious decision and not just hit "Commit and Push" twice.
 
* a dialog that comes up when push fails non-fast-forward

I'd also love you guys to comment on my other suggestions if you see anything wrong/you would agree etc.
 
For cloning you may consider to use the GitHub connector, after installing that you get a new clone source
"Github" in the clone dialog which allows to search for the repository you are looking for using Github's
REST API.

When creating topic branches you should create them based on the remote tracking branch you
are shooting for since then the new topic branch will track the remote tracking branch
(and not a local one). So click the remote tracking branch e.g. origin/master and choose "Create Branch..."
Note that the source ref is then refs/remotes/origin/master signaling that your new local
branch will track the remote tracking branch origin/master.

For simplified pushing you may give "Push Branch..." a try which is available on local branches
in the repositories view.
*  Team->Remote->Push needs one 1 click too much: it doesn't come preconfigured. You have to select your local branch, add the refspec and check "force". I'd prefill the local branch. That would safe 1 click and would things slightly more handy. Thoughts?

that looks like a good idea

okiedokie, I'll file a bugzilla and provide a patch...


 
* Team->Push To Upstream wont allow me to push force. Invoking it will tell me that my push is of course "non fast-forward". The only option I have there is to "Configure..." but this will change my repo-configuration and this is not what I want to do. I only want to push force this single time (and eventually another time later on). What about offering "Push..." there, too?

push to upstream is meant to be single click for the most frequently needed case.
Why don't you trigger Push... from the repositories view ?

I initially used "Push..." but it for some reason always results in nothing done, it tells me "already up to date". I planned to investigate why this happens...

maybe that's caused by your practice to create the topic branch based
on another local branch instead of a remote tracking branch.

--
Matthias 

Back to the top