atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.11k stars 393 forks source link

Display remote-tracking branches in branch list #302

Open kuychaco opened 7 years ago

kuychaco commented 7 years ago

Currently if the user fetches all remote branches, there is no way to checkout a newly-fetch branch.

For example, imagine a branch foo exists on the remote but you don't have it locally.

➜  git fetch
From https://github.com/kuychaco/test-repo
 * [new branch]      foo      -> origin/foo

git branch will not show it as a local branch until you type either git branch foo or git checkout foo

Right now we are populating the branches select list by using the output to git branch. To include branches that the user can check out that they have fetched, we should perhaps also display output from git branch --remotes

  origin/my-branch
  origin/HEAD -> origin/master
  origin/foo
  origin/qux
ungb commented 7 years ago

+1 for this!

ungb commented 7 years ago

/cc @simurai We were wondering if you could help us with the UX on this. A huge list could be ugly.

Intellij has a dropdown that looks like this(it can get huge if there's a lot of branches): image

I wonder if we could create some UI that allows you to do a search of remote/local branches

github Desktop has the following:

image

simurai commented 7 years ago

Short term

There is the <optgroup> element to group options. So in the dropdown we could have two groups, local and remote:

screen shot 2017-02-11 at 11 01 51 am

<select class="github-BranchMenuView-item github-BranchMenuView-select input-select">
  <optgroup label="Remote Branches">
    <option value="master">master</option>
    <option value="new-pr">new-pr</option>
  </optgroup>
  <optgroup label="Local Branches">
    <option value="master">master</option>
    <option value="new-branch">new-branch</option>
    <option value="shadow-doom">shadow-doom</option>
    <option value="sm-test-2">sm-test-2</option>
    <option value="sm-test-3">sm-test-3</option>
  </optgroup>
</select>

A huge list could be ugly.

Yup, atom/atom has 79 remote branches. :see_no_evil: Just show active branches? Or capped to the 15-20 most recent?

Long term

UI that allows you to do a search of remote/local branches

@kuychaco had something in mind similar to GitHub Desktop. Also requested in 👉 https://github.com/atom/github/issues/293.

What about 2 lists ( 🤔 sounds familiar ) that individually scroll:

_branch

But are also collapsible. Then you can close one if you want more space for the other:

_branch 4


Another idea is to initially have the current branch already as value in the input and selected (but not actually do the filtering):

_branch 2

Then you could do the following:

_branch 3

Also, should there be an option to sort the lists? Maybe:


And at some point we can also start considering other features, like:

yubaoquan commented 7 years ago

+1

duncdrum commented 7 years ago

+1 not having remote branches is a major limitation

itblaked commented 7 years ago

+1 How's this going?

DavidMansolino commented 7 years ago

+1

yubaoquan commented 7 years ago

Is this feature still wip?

ygd commented 6 years ago

+1

mattpilott commented 6 years ago

+1

niklaswesterstrahleknowit commented 6 years ago

+1

anthonysexton commented 6 years ago

+1

Arcanemagus commented 6 years ago

For those of you simply posting "+1": it will do far more for this issue to add your votes to the initial post.

Byoung730 commented 6 years ago

has this been remedied? is there a beta I can get at?

Arcanemagus commented 6 years ago

@Byoung730 This issue is still open, so it hasn't been resolved yet 😉.

You should follow https://github.com/atom/github/pull/1370 as it's likely the implementation of that RFC will resolve this.

calebmeyer commented 6 years ago

For the UI of this, I'd really like to see the remote named if it's not origin. In all the UI examples above, we're treating all remote branches the same. However, origin/master and upstream/master are two very different branches, and we'd want to make sure we don't mix those up.

osilkin98 commented 5 years ago

God I need this

LoganTann commented 3 years ago

It's been more than 3 years I'm waiting for this, because the integration between atom and github is really great ! Any update about this issue (or an extension/ctrl shift P command that would allow checkout to remote branchs as simple as the git cli) ?