(no title)
AndrewHampton | 1 year ago
> gfx='git commit --fixup $(git log $(git merge-base main HEAD)..HEAD --oneline| fzf| cut -d" " -f1)'
It shows you the commits on the current branch and lets you select one via fzf. It then creates the fixup commit based on the commit you selected.
nickspain|1 year ago
[^1]: https://github.com/mystor/git-revise
kccqzy|1 year ago
AndrewHampton|1 year ago
> What if I want some parts of it into one commit and another parts into another?
Looks like absorb will automatically break out every hunk into a separate fixup commit. My one-liner will create 1 fixup commit for everything that's staged. That's typically what I need, but on the occasions it's not, I use `git add -p`, as kadoban mentioned, to stage exactly what I want for each commit.
atq2119|1 year ago
kadoban|1 year ago
k3vinw|1 year ago
account42|1 year ago
psadauskas|1 year ago
mdaniel|1 year ago
jonS90|1 year ago
unknown|1 year ago
[deleted]
johnnypangs|1 year ago
alias gfixup="git commit -v --fixup HEAD && GIT_SEQUENCE_EDITOR=touch git rebase -i --stat --autosquash --autostash HEAD~2"
From what I understand it does the same thing as this crate for the most part. All I do after is:
git push —force-with-lease
Not sure what you get from the crate otherwise
masklinn|1 year ago
Absorb will find the commits to fix up for each change in the working copy, it doesn’t just merge everything into the head.
johnnypangs|1 year ago
emersion|1 year ago
mckn1ght|1 year ago
AndrewHampton|1 year ago
masklinn|1 year ago
dangitman|1 year ago
[deleted]