So my favorite is a git alias. When I have PR request open and I get comments on it and need to address them and then commit and rebase them.
The need for rebasing the last commit is to squash the fixing comments commit into the one that the PR is actually for, ie. Add some feature
I do this all the time and with git when you rebase it opens up your text editor so you can edit the commits you are rebasing to tell git whether you want to squash, drop, edit the commit messages.
I found it annoying that you have to manually type go down and change pick to s every time I had to address PR comments. So I found a Stack Overflow answer and turned that into this alias.
This improved my life a lot. Try it for yourself if you want and if anything gets messed up remember git reflog and git reset HEAD@{#} are your friends.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So my favorite is a git alias. When I have PR request open and I get comments on it and need to address them and then commit and rebase them.
The need for rebasing the last commit is to squash the
fixing comments
commit into the one that the PR is actually for, ie.Add some feature
I do this all the time and with git when you rebase it opens up your text editor so you can edit the commits you are rebasing to tell git whether you want to squash, drop, edit the commit messages.
I found it annoying that you have to manually type go down and change
pick
tos
every time I had to address PR comments. So I found a Stack Overflow answer and turned that into this alias.This improved my life a lot. Try it for yourself if you want and if anything gets messed up remember
git reflog
andgit reset HEAD@{#}
are your friends.