Skip to content

Show previous commit message instead of "Uncommitted changes" #1930

@devinrhode2

Description

@devinrhode2

Often times, I find myself tweaking various little things, for example, turned a word to all caps:
CleanShot 2022-03-28 at 08 20 56@2x

I would then like to squash this change into the original commit.

Using github desktop to drag and drop commits, squashing locally is really easy.

You just have to know which two commits to combine.

If this showed the previous commit message instead of "Uncommitted changes" then I could very easily squash this little change in that latest commit on this line.

I think in this vscode diff view, showing "Uncommitted changes" is not useful

Gitlens helped inspire me to care about commit history MUCH more

It can also help us create better history :)

It's actually buggy too:
CleanShot 2022-04-21 at 08 52 43@2x

Basically showing "Uncommitted changes" just isn't useful to me in my workflows.

It is/was possible to get into a state where a line is unchanged, file is saved, vscode doesn't have any red/green highlight in the live diff view BUT, git lens still shows "Uncommitted changes" [which is wrong/incorrect/inaccurate]

There are two features that would make this bug irrelevant for my workflow:
1 squash a line change into originating commit
2 just always show the most recent commit message on a given line

I've thought about writing a "git vanish " command which will selectively squash each line into the previous commit on that line.

I think if I could squash a single line change into the last commit on that line, it would make the "uncommitted changes" bit mostly inconsequential

However, it may be a useful initial exercise in getting to know the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    under-discussionBeing considered or is under active discussion

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions