Skip to content

After committing on a branch with very few commits, the History view sometimes displays incorrectly #22064

Open

Description

@1299172402

The problem

When a branch has a very short commit history (e.g., only 1–3 commits), after making a new commit and immediately viewing the History tab in GitHub Desktop, the UI sometimes fails to show the latest commit correctly.

The actual Git repository history is correct. This is a UI display issue only in GitHub Desktop.

Not 100% reproducible, but frequent enough to be noticeable.

The issue for me has been observed for months (possibly years) across multiple older versions of GitHub Desktop.

The only way to get back to normal is to restart Github Desktop.

Release version

3.5.8 (x64) on Windows

Operating system

Windows 11

Steps to reproduce the behavior

1.Create a new branch or use an existing branch with very few commits (e.g., 2–3 commits).
2.Make a change and commit it via GitHub Desktop.
3.Immediately after committing, click on the History tab.
4.Cannot click commit or previous commit records appear repeatedly and sometimes the latest records are not displayed.

Log files

2026-05-04.desktop.production.log

Screenshots

2026-05-04.23-32-09.mp4

Additional context

No response

Activity

  1. 1299172402 commented on May 4, 2026

    @1299172402
    Author

    This issue only happens on branches with very few commits. Once the branch accumulates more commits (When there are so many historical records that you need to scroll through the pages), the problem disappears completely.

    maybe related: #21420

  2. 1299172402 commented on May 4, 2026

    @1299172402
    Author
    2026-05-04.23-47-16.mp4

    Another screen record

    The first commit will be shown twice. And the latest commit cannot be displayed (the records of the previous commit are displayed there)

  3. DUK3135 commented on May 4, 2026

    @DUK3135
  4. babakks commented on May 14, 2026

    @babakks
    Member

    Thanks for reporting this, @1299172402! 🙏

    This is also reported in #22098, but I couldn't reproduce it there.

    I can confirm this is a bug, and I'm labelling it accordingly.

    Repro

    I made a new repository (clean), added first commit, then second commit and right away clicked on the History tab, and my first commit was repeated twice.

    Image

    I then added another commit, and quickly switched to the History tab again, and now I can see my first commit three times.

    Image

    The logs do not show anything:

    2026-05-14T11:29:01.143Z - info: [ui] [AppStore] adding repository at C:\Users\babakks\Documents\GitHub\gh-babakks\temp-bar to store
    2026-05-14T11:29:08.376Z - info: [ui] [Timing] Action 'create commit' for 'temp-bar' took 0.461s
    2026-05-14T11:30:10.050Z - info: [ui] [Timing] Action 'create commit' for 'temp-bar' took 0.430s
    2026-05-14T11:33:34.938Z - info: [ui] [Timing] Action 'create commit' for 'temp-bar' took 0.497s
    
  5. added
    bug
    priority-3
    on May 14, 2026
  6. FS001A commented on Jul 8, 2026

    @FS001A

    @babakks Warm Reminder:This bug still exists in the new Windows version 3.6.2 (x64), and the behavior is identical to what is shown in this video. This means the bug has not yet been fixed.
    My computer runs Windows 11. I suspect this bug may be related to the system refresh cache, but I have not been able to find a viable workaround.
    If I were to offer a suggestion: I hope you can add a refresh function within the application for users to attempt resolving issues when they encounter problems. Naturally, the ideal solution would be to fix this bug entirely.

    Additional Information:
    First, I have conducted further tests on this bug. The creator of this issue mentioned that "This issue only happens on branches with very few commits". However, based on my additional testing, it appears more accurate to state that this bug occurs when you click "commit to main" and then immediately click History right afterwards. If you wait a few seconds after clicking "commit to main" before opening History, the bug does not seem to occur.

    Therefore, if the bug cannot be fixed for the time being, a temporary workaround may be to wait a few seconds after clicking "commit to main" before opening History. This would be more convenient than repeatedly restarting the application. Of course, if possible, please try your best to identify the root cause of this issue and resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority-3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions