FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.45k stars 638 forks source link

Improve usability with multiple remotes #790

Open cben opened 8 years ago

cben commented 8 years ago

I love how ungit lets you treat remotes as "just" branches, instead of thinking in "pull"/"push" terms. This is achieved by (1) always-safe fetch separated from merging (2) auto-fetching (3) ability to "Move" remote branches same as local.

But once you have multiple remotes, you have to deal with the "Fetch from $remote" combo button which I find somewhat confusing, and suspect it could be simpler. I used ungit to teach git to @anpc this week, and found several aspects hard to explain, and indeed saw her stumble on some of these:

  1. When you pick remote from dropdown, it's not obvious you now have to click "Fetch from".
  2. Fetching multiple remotes is tedious (choose, click, choose, click).
  3. Ungit auto-fetches in some situations (startup, focus tab?) but it seems only the selected remote (?).
  4. "push" action is also controlled by this dropdown, which is very unexpected given it's visually part of "Fetch from ..." button.
  5. OK, this is a question not a problem: does this dropdown depend/affect which remote a local branch is tracking? Or does ungit ignore that?

Brainstorming:

IMO fetching just one remote is an optimization, and it's worth giving up for conceptual simplicity. (Can fetch all be done in parallel to hide latency?)

cben commented 8 years ago

A simpler orthogonal way to fix (4): add a separate dropdown to "Push" button (making it "Push to ..."). Dropping Push altogether is not good, there is no other easy way to push a new branch a remote doesn't yet have.
But Move should be improved to visually stress the equivalence to Push (when it's the matching branch).

jung-kim commented 8 years ago

@cben I do agree with general sentiment that we can improve how ungit handles remote can be improved. I think I address most of your questions or suggestions but please let me know if I have missed anything or you would like to add more.

  1. When you pick remote from dropdown, it's not obvious you now have to click "Fetch from". // I agree, we may need better way to display fetch button
  2. Fetching multiple remotes is tedious (choose, click, choose, click). // Yes, I do agree that we need "fetch'em all" method
  3. Ungit auto-fetches in some situations (startup, focus tab?) but it seems only the selected remote (?). // Correct, auto fetches upon state becoming active from inactive is only for selected remote. I'm not sure if fetch all is a good idea on auto. Perhaps this can be configurable
  4. "push" action is also controlled by this dropdown, which is very unexpected given it's visually part of "Fetch from ..." button. // I can't say I agree with this sentiment this maybe due to the fact that I have been working with this UI for long time. Not sure how I can fix it though. But this "push to" method definitely can be done and I may experiment with it later.
  5. OK, this is a question not a problem: does this dropdown depend/affect which remote a local branch is tracking? Or does ungit ignore that?
    // ungit is driven by all the information in ".git" folder. registering remote via ungit is same things as registering remote via git command line. So yes remote repo shown in ungit is direct reflection of remote repo registered in git
  6. But Move should be improved to visually stress the equivalence to Push (when it's the matching branch). // I understand this maybe a surprise but not sure how I can visually stress this. And I think this maybe the most minor problem amongst all as it can be reversible either by another move or revert.

All in all, I will try out 3 things.

cben commented 8 years ago

Not quite related but

7) A push that looks like it will fast-forward but fails should auto-fetch before asking whether to force push. The answer is usually "ah, I need to fetch and merge first" but the meaning of the error is unclear if you don't see the diverged history in front of you.

I'll be happy to make PRs, let me know where to start.

jung-kim commented 8 years ago

On new point, I will give it more thought when it's weekday and I have more blood in my alcohol system. But I have separated out todos to different issues. And amongst all I think #798 will be the easiest and it would be the good point of entry for you.

But please let me know which issue you are interested in and I will be happy to guide you based on your preference. Feel free to take all if you would like.