Correct Git commits with git-autofixup
symflower.com
Correct Git commits with git-autofixup
1–10 of 67 posts
Re: Correct Git commits with git-autofixup
#2Re: Correct Git commits with git-autofixup
#3``` autofixup = !"autofixup origin/master --exit-code; test $? -lt 2 && GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash $(git merge-base HEAD origin/master)" ```
Works almost every time perfectly, and when not i always get a comment during a code review.
Re: Correct Git commits with git-autofixup
#4git-absorb is another implementation: - https://github.com/tummychow/git-absorb - https://lib.rs/crates/git-absorb
I'm painfully familiar with the problem they solve and am delighted to discover they exist.
I'd love some input about how they differ.
Re: Correct Git commits with git-autofixup
#5I'd switch away from Emacs but magit keeps me hooked!
Re: Correct Git commits with git-autofixup
#6Re: Correct Git commits with git-autofixup
#7Re: Correct Git commits with git-autofixup
#8If you're an Emacs user, I must recommend magit ( https://magit.vc/ ) - the interactive rebasing (including squashing/fixups) is one of the best UIs (overall, not just git) I've seen in my life. I'd switch away from Emacs but magit keeps me hooked!
Re: Correct Git commits with git-autofixup
#9For this issue and so many others, everyone should just get comfortable with interactive rebase. Crutches like this trap you in this space of never really learning git. And that's a tragedy. All because you're impatient? Afraid?
Re: Correct Git commits with git-autofixup
#10git-autofixup definitely changed my daily development life.... I mostly use it with this Git alias ``` autofixup = !"autofixup origin/master --exit-code; test $? -lt 2 && GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash $(git merge-base HEAD origin/master)" ``` Works almost every time perfectly, and when not i always get a comment during a code review.
Why during CR? Is the error not obvious to you? You should be able to check the results of your changes before pushing, right?