4 ms·
1) Write commit message. 2) THEN start doing work. If you get up for a spliff break, 1st thing after sitting back down is re-read commit message. Stay on track.
by andirk 4y ago
1) Write commit message.
2) THEN start doing work. If you get up for a spliff break, 1st thing after sitting back down is re-read commit message. Stay on track.
3) Stage files that are kempt, like a mini commit within the commit.
4) Once all files are staged, look at them and look at the message to make sure you have mentioned all that changed, including sometimes _why_.
5) Commit! But don't always push! Only push if you really like what you did.
6) Repeat. Squash similar commits together.
7) Rebase in master or merge in master.
8) Push!
9) Repeat!
10) PR!
Your commits will read like a story of the what and sometimes the why. PRs go smoothly. All is well. Lots of steps but it takes very little extra time.