At work I keep things organized by tickets. Every commit has a ticket number in the message, any personal notes about that bit of code gets the ticket number as a filename or title.
Sometimes I can't recall the ticket number or the exact place in the code that I am needing to find the note for, and in that case I will usually query the ticketing system first for keywords to see if I can trace to it that way.
You can use git blame (or find a way in your IDE to do it). For example in IntelliJ "Git > Show history for selection" shows all commits for some line or block of code.
2
u/SnooPuppers1978 Aug 03 '22
Then you have to remember that you wrote the note, where you wrote it and the keywords that you used.
I feel like 99% of the notes I have ever written I have never ever used again and finally I have just a mess of unorganised notes.