Hacker News new | past | comments | ask | show | jobs | submit login

Love this. I would add:

  git commit —-fixup $COMMIT_ID
combined with

  git rebase -i upstream/master —autosquash
These have become staples of my recent workflow. Julia’s example uses HEAD^^^^^ to rebase the previous 5 commits. I have been doing this as HEAD~5, until recently I realized you can just rebase all commits up to the upstream HEAD.



Ahh, thank you:

    git commit —-fixup $COMMIT_ID
I'm adopting this immediately. I always make little "oops <topic>" commits like "oops GET users/me" and then manually move and fixup them on my next interactive rebase. This is much better!


I only recently learnt this one, it's great for working with stacked patches in gerrit.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: