You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Branches in branch list give no clear indication of their publication status or whether they contain un-pushed commits #5330
When we are working across multiple branches, it's easy to incorrectly think you have pushed everything to remote when you have actually only done it for the current branch. This is because people rely on the push/pull/sync button as a way to say 'am I all up to date?'
It would be good if there were some indication that there are other branches that have unpushed commits, or maybe a button to just push all unpushed commits across branches.
Reacted by Jon Brown, Dave Nutter, Daniel, Gianr Lazz, Haitao, RoukePouw, Randall Wood, goyalyashpal, M.A. (Mana) and Hidde van der Ploeg
changed the title [-]User can easily end up with unpushed commits on other branhces without noticing[/-][+]User can easily end up with unpushed commits on other branches without noticing[/+]on Aug 3, 2018
@mungojam Thanks so much! If you have a moment, can you describe a specific instance or two where you've experienced this go wrong for you or others? It'll help us in how to frame how we look into whether and how others are having difficulty with this.
Sure, I think part of it is a thing of habit and of familiarity with git. The users we are rolling GitHub out to have never used git before (most have never used any source control before) and they can do most of what they need in GitHub desktop or the IDE.
The couple of recent cases were:
The dev was creating a code training repository with a master branch, containing some exercise code and a solution branch containing the exercise solution. They were flipping between the two a bit as they worked on the exercise and the solution in tandem. When looking over their shoulder to help them I saw that master had pending pushes, but then they switched to the solution branch to do some fixes, pushed them and thought that everything was then published (because of relying on the push/pull/fetch button to say I'm all good).
One that's hit me a few times. I'm working on a feature branch, then I spot some very small fix that I'd like to update and release to the dev or master branch. So I flip to that branch, do the fix, then flip back and merge/rebase into my feature branch. I've then either forgotten to push to dev/master or I worry that I have so I flip back to it to find out.
I'm sure there are good ways to deal with this on the command line, but GitHub desktop is now covering so many scenarios that we can avoid having to train most people on the command line. We just have a few people on hand to rescue things if it all goes pear shaped and we have a few recipes documented.
Thanks @mungojam! That’s really helpful in framing the problem. We’re currently evaluating the entire backlog of problems people have brought up (like you did here), and then prioritizing which to dig into first. So I wouldn’t anticipate anything happening quickly on this, but we’ll definitely follow up. And if others have seen this as well, additional context on how it has bitten you is always appreciated, and feel free to +1 the original issue.
Please describe the problem you think should be solved
Unless I am missing the indicator somewhere, I think it would be nice to have a small graphical indicator of which branches are published to the remote and which are not. As it is, the only way to know if it is published to the remote is to hop over to that branch and check the "fetch/pull/publish" button and see what state it is in. It would be nice to be able to see it from the branch selection menu.
[Optional] Do you have any potential solutions in mind?
The only solution I can think of is to have a small graphic/icon or bit of text next to each branch indicating it is published. This could be either to the left or right of the timestamp. The absence of such icon or text would indicate it is not published.
Reasoning
Many times, I do not publish a branch instantly, as I will create handfuls of branches locally, then merge some and delete others and only publish the ones I truly need. When it comes to running down the list to see which ones need published, I basically have to go through the whole list. It would greatly speed up my workflow (and others hopefully) to have indicators next to the branches that are published.
A more simple alternative would be to have an option under one of the menu bar menus (probably repo?) to "publish all branches," although this may be a little more tacky and doesn't offer additional information like the indicators would.
Reacted by Mark Adamson, Joseph T. Lyons, Randall Wood, goyalyashpal and Hidde van der Ploeg
changed the title [-]User can easily end up with unpushed commits on other branches without noticing[/-][+]Branches in branch list give no clear indication of their publication status or whether they contain un-pushed commits[/+]on Aug 27, 2018
@iAmWillShepherd completely understand the rename, but note that there was another possible solution to my problem which would be a single flag that was always visible and indicated that some other branches had unpushed commits.
That can be handy in our scenarios because it doesn't require clicking anywhere to know whether we're all up to date or not
@mungojam I appreciate that you have a proposed solution and the team will take your feedback under consideration when designing a solution that works to solve both issues. The name change was to help the team understand, at a high level, what this issue is about and was not meant to take away from what you've contributed so far 💟
Ok sure, it's just that the new name says that the problem is with the branch list which wouldn't be the case if you solve it another way. Not to worry, I'm probably being too pedantic, thanks for taking my ideas on board
@mungojam would you mind elaborating your proposed solution a bit?
It would be good if there were some indication that there are other branches that have unpushed commits
Right now, as I understand it, your issue is about seeing a visual indicator for any branch having un-pushed commit. I assume your idea is to have that indicator live at the top level of the app.
I may have wrongly assumed you meant you were seeking an indicator per branch because I did not see the value of just knowing that some branches have unpublished commits when we could specify which branches were in that state.
It seems that that my suggestion and @mungojam are slightly different, but extremely closely related. I think it would be great to have a visual indicator in the branch list next to each branch that verifies if the branch is published or not. I even like the idea of having indication if there are commits that are not pushed to the remote as well (what @mungojam seems to be suggesting). Despite me originally saying to show a graphic when the branch is published, it might be better to show it when one is not published, as you could roll both ideas of showing unpushed commits AND showing unpublished branches into the same space and never have to show both at the same time (in the case of having a published branch with commits not pushed), which would save screen real estate. Here is my revised logic:
In the branch menu:
// pseudocodeIf (branch is published)
{
if (branch has X commits that aren't pushed and Y commits not pulled) // Where X and Y > 0 show graphic next to branch to indicate X / Y push pull status else show "up to date" // or something similar}else show a graphic next to branch showing it is unpublished
A red dot could mean branch not published.
A green dot could mean branch published and both local and remote are up to date.
And “x (up arrow) / y (down arrow)” text could be used to indicate a branch is published but has commits that need pushed and/or pulled.
Just an idea...
Also, the more I think about having a "push all commits from all branches" button (something I and @mungojam both suggested), the more I think it is a dangerous idea. Not having that button forces us to at least navigate to each branch (an easy task with an indicator system in place), which gives us an extra chance to make sure we are not pushing something we shouldn't.
Thanks for the thoughtful clarifications @mungojam and @JosephTLyons. While acknowledging that the problem exists, I also just want to flag that we've run into some performance hurdles doing checks on lots of branches, and I'm guessing (but not positive) something like this could get expensive if there are > ~20 branches, so when we're able to dig deeper into this, just want to make sure that's a consideration.
something like this could get expensive if there are > ~20 branches
For my two scenarios, we are just flipping between two branches, one of them often master, so hopefully some caching when the commits are done could help here. Or if another tool did the commit and then switched branch quickly, you might need to then just check the previous branch to see if it had any unpushed commits. That only works if GitHub Desktop is open, but we often do have it open all the time for the repo we are working on.
I may have wrongly assumed you meant you were seeking an indicator per branch because I did not see the value of just knowing that some branches have unpublished commits when we could specify which branches were in that state.
The more information the better (unless it makes it too noisy), but when just working between two branches a global indicator that there are unpushed commits somewhere would satisfy me. It's a 'you are in the danger zone' flag to people. I guess it would get annoying if you had another long-standing branch that you didn't push for a long time for some reason but I haven't yet had that scenario.
Activity
shiftkey commentedon Aug 3, 2018
@mungojam thanks for the suggestion.
This is an interesting idea, and I'd love for @billygriffin to ask questions and probe into this further.
[-]User can easily end up with unpushed commits on other branhces without noticing[/-][+]User can easily end up with unpushed commits on other branches without noticing[/+]billygriffin commentedon Aug 3, 2018
@mungojam Thanks so much! If you have a moment, can you describe a specific instance or two where you've experienced this go wrong for you or others? It'll help us in how to frame how we look into whether and how others are having difficulty with this.
mungojam commentedon Aug 3, 2018
Sure, I think part of it is a thing of habit and of familiarity with git. The users we are rolling GitHub out to have never used git before (most have never used any source control before) and they can do most of what they need in GitHub desktop or the IDE.
The couple of recent cases were:
masterbranch, containing some exercise code and asolutionbranch containing the exercise solution. They were flipping between the two a bit as they worked on the exercise and the solution in tandem. When looking over their shoulder to help them I saw thatmasterhad pending pushes, but then they switched to the solution branch to do some fixes, pushed them and thought that everything was then published (because of relying on the push/pull/fetch button to say I'm all good).I'm sure there are good ways to deal with this on the command line, but GitHub desktop is now covering so many scenarios that we can avoid having to train most people on the command line. We just have a few people on hand to rescue things if it all goes pear shaped and we have a few recipes documented.
billygriffin commentedon Aug 6, 2018
Thanks @mungojam! That’s really helpful in framing the problem. We’re currently evaluating the entire backlog of problems people have brought up (like you did here), and then prioritizing which to dig into first. So I wouldn’t anticipate anything happening quickly on this, but we’ll definitely follow up. And if others have seen this as well, additional context on how it has bitten you is always appreciated, and feel free to +1 the original issue.
billygriffin commentedon Aug 27, 2018
Via @JosephTLyons, copied over from #5474:
Please describe the problem you think should be solved
Unless I am missing the indicator somewhere, I think it would be nice to have a small graphical indicator of which branches are published to the remote and which are not. As it is, the only way to know if it is published to the remote is to hop over to that branch and check the "fetch/pull/publish" button and see what state it is in. It would be nice to be able to see it from the branch selection menu.
[Optional] Do you have any potential solutions in mind?
The only solution I can think of is to have a small graphic/icon or bit of text next to each branch indicating it is published. This could be either to the left or right of the timestamp. The absence of such icon or text would indicate it is not published.
Reasoning
Many times, I do not publish a branch instantly, as I will create handfuls of branches locally, then merge some and delete others and only publish the ones I truly need. When it comes to running down the list to see which ones need published, I basically have to go through the whole list. It would greatly speed up my workflow (and others hopefully) to have indicators next to the branches that are published.
A more simple alternative would be to have an option under one of the menu bar menus (probably repo?) to "publish all branches," although this may be a little more tacky and doesn't offer additional information like the indicators would.
[-]User can easily end up with unpushed commits on other branches without noticing[/-][+]Branches in branch list give no clear indication of their publication status or whether they contain un-pushed commits[/+]iAmWillShepherd commentedon Aug 27, 2018
I changed the title to better summarize this issue.
mungojam commentedon Aug 27, 2018
@iAmWillShepherd completely understand the rename, but note that there was another possible solution to my problem which would be a single flag that was always visible and indicated that some other branches had unpushed commits.
That can be handy in our scenarios because it doesn't require clicking anywhere to know whether we're all up to date or not
iAmWillShepherd commentedon Aug 27, 2018
@mungojam I appreciate that you have a proposed solution and the team will take your feedback under consideration when designing a solution that works to solve both issues. The name change was to help the team understand, at a high level, what this issue is about and was not meant to take away from what you've contributed so far 💟
mungojam commentedon Aug 27, 2018
Ok sure, it's just that the new name says that the problem is with the branch list which wouldn't be the case if you solve it another way. Not to worry, I'm probably being too pedantic, thanks for taking my ideas on board
iAmWillShepherd commentedon Aug 27, 2018
@mungojam would you mind elaborating your proposed solution a bit?
Right now, as I understand it, your issue is about seeing a visual indicator for any branch having un-pushed commit. I assume your idea is to have that indicator live at the top level of the app.
I may have wrongly assumed you meant you were seeking an indicator per branch because I did not see the value of just knowing that some branches have unpublished commits when we could specify which branches were in that state.
Please let me know if I'm off.
JosephTLyons commentedon Aug 27, 2018
It seems that that my suggestion and @mungojam are slightly different, but extremely closely related. I think it would be great to have a visual indicator in the branch list next to each branch that verifies if the branch is published or not. I even like the idea of having indication if there are commits that are not pushed to the remote as well (what @mungojam seems to be suggesting). Despite me originally saying to show a graphic when the branch is published, it might be better to show it when one is not published, as you could roll both ideas of showing unpushed commits AND showing unpublished branches into the same space and never have to show both at the same time (in the case of having a published branch with commits not pushed), which would save screen real estate. Here is my revised logic:
In the branch menu:
Just an idea...
Also, the more I think about having a "push all commits from all branches" button (something I and @mungojam both suggested), the more I think it is a dangerous idea. Not having that button forces us to at least navigate to each branch (an easy task with an indicator system in place), which gives us an extra chance to make sure we are not pushing something we shouldn't.
billygriffin commentedon Aug 28, 2018
Thanks for the thoughtful clarifications @mungojam and @JosephTLyons. While acknowledging that the problem exists, I also just want to flag that we've run into some performance hurdles doing checks on lots of branches, and I'm guessing (but not positive) something like this could get expensive if there are > ~20 branches, so when we're able to dig deeper into this, just want to make sure that's a consideration.
mungojam commentedon Sep 28, 2018
For my two scenarios, we are just flipping between two branches, one of them often master, so hopefully some caching when the commits are done could help here. Or if another tool did the commit and then switched branch quickly, you might need to then just check the previous branch to see if it had any unpushed commits. That only works if GitHub Desktop is open, but we often do have it open all the time for the repo we are working on.
mungojam commentedon Sep 28, 2018
@iAmWillShepherd
The more information the better (unless it makes it too noisy), but when just working between two branches a global indicator that there are unpushed commits somewhere would satisfy me. It's a 'you are in the danger zone' flag to people. I guess it would get annoying if you had another long-standing branch that you didn't push for a long time for some reason but I haven't yet had that scenario.
hiddevdploeg commentedon Aug 17, 2023
I second this! It would be great if there was a visual indicator for wether or not a branch is published.

Could be as simple as this:
hiddevdploeg commentedon Aug 17, 2023
If anyone feels like implementing the above, here are the SVG's
BranchIcons.zip
JosephTLyons commentedon Aug 18, 2023
Fork supports this feature

Show ahead/behind counts in the branch list
Show ahead/behind counts in the branch list