question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Differentiating commits in history between local-only and remote

See original GitHub issue

Please describe the problem you think should be solved Currently the history view displays local commits the same as synced commits, minus ‘View on Github’ being greyed out. This isn’t ideal as you can’t tell at a glance what is local and needs to be pushed, and the ‘undo’ feature isn’t accessible in the history view.

Do you have any potential solutions in mind? I’d suggest a few changes to improve how local commits are shown in the history tab:

  1. Add a ‘This commit has not been pushed’ indicator somewhere, visually similar to the uncommitted changes indicator on the repository list. Possible implementations could be before the commit change message, at the end of it, or fixed in the upper right corner.

  2. If the commit is local, and at the top of the commits list, swap ‘Revert This Commit’ with ‘Undo This Commit’ so that the undo feature is available on the history view. This is nicer than undoing commits from the changes tab where you don’t know how many are available to undo. I can’t think of a reason you’d want to revert the top-level local commit rather than just undoing it.

  3. [Optional] This one is more work, but being able to edit the commit message of a local commit would be nice (I imagine under the covers that would be a git rebase which uses the reword option). I’ve definitely had cases where I have several local commits and I spot a typo in a commit message for one further back in the list. Using git rebase with the reword option is a simple solution, but it seems like GitHub Desktop could provide this functionality natively.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
shiftkeycommented, Oct 18, 2018

We had an earlier issue about this behaviour #4645 which I’ll add the screenshot from @r-pascal about the classic behaviour:

1reaction
billygriffincommented, Nov 28, 2018

@ampinsk That seems reasonable to me. My only concern is potential conflation of informational vs. actionable in the icon. In the push button, the up arrow indicates that it’s an action you can take to push your commits up to the remote. But it seems to be working fine in the repo indicators, and those are informational, so that helps to mitigate my concern.

I’m just a bit worried that people might see those commits and think you can click on that button to push them up. Could be as simple as including a tooltip that says something like “This commit has not yet been pushed to your remote branch” or something along those lines. Or it’s possible I’m overthinking it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Commit differences between local and remote - Stack Overflow
How can I ask what commits are different between my current local branch and the remote repository that I push to?
Read more >
7.6 Git Tools - Rewriting History
This can involve changing the order of the commits, changing messages or modifying files in a commit, squashing together or splitting apart commits,...
Read more >
Git Commands — Quick Guide
It is described as Collection of Files Managed by Git and History of all them. Commits and Files: All the files managed by...
Read more >
Save data in a local database using Room | Android Developers
Learn to persist data more easily using the Room Library.
Read more >
Looking at history and differences – Version control with Git
Be able to view history of changes to a repository ... Looking at differences between commits is one of the most common activities....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found