Skip to content

Add button which calls git absorb --and-rebase (Squash single line change into most recent commit modifying that line git vanish) #1969

@devinrhode2

Description

@devinrhode2

I believe default behavior here should be to wrap the git commit --squash option.

See: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---no-autosquash

Here's a more specific, detailed example:

person went to store
forgot ther bk lok // ** NOTE THIS LINE
someone stole the bike

I commit this:

git add -A && git commit -m "Initial commit asdf"

Later on, the story(i.e. code) has MANY more changes. Chapter 1, chapter 2, chapter 3. As these chapters are written, some content in previous chapters is refactored. I come back next week, and am preparing first draft for submission to my reviewer.

I correct typos on line 3:

-forgot ther bk lok
+forgot their bike lock

GitLens's new feature would allow me to right click this line, or use some other ui, to say "squash this line change into originating commit"

Mind you that the git blame on this line was originally Initial commit asdf

There could be a fancy little button in this ui:
CleanShot 2022-10-29 at 13 46 22

Metadata

Metadata

Assignees

Labels

triageNeeds to be looked at

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions