Note di Matteo


#git

Review your own git pull requests

When you create a pull request in GitHub, click on the Files changed tab, and scroll through the diff. Anywhere you’ve done something new that’s not already explained by in-code comments, add a comment in the GUI about what you did and why.

  • Often, it’s stuff that’s not important enough for in-code commentary, but is useful for the reviewer to know.
  • Sometimes, it’s stuff that should actually be documented in the code, and this is a good time to go back and add it.
  • Every now and then, you’ll notice a bug in your own code because you’re reading it with fresh eyes, in a different format than your text editor.

It’s a simple behavior change that adds maybe 5 or 10 minutes to the time it takes to setup a PR, but it’s saved me so many headaches, and makes life for whoever reviews your PR a lot easier, too!

(Chris Ferdinandi)

#161 /
17 novembre 2025
/
22:56
/ #dev#git

TIL con un file .git-blame-ignore-revs si possono ignorare determinati commit dall'output "blame" su GitHub (o con git blame --ignore-revs-file .git-blame-ignore-revs), utile quando si fanno refactoring o si modifica la formattazione ma non la funzionalità.

(fonte, esempio)

#151 /
15 novembre 2025
/
16:16
/ #dev#git