Keep Your Code Close and Your Notes Closer With a Global Gitignore
I like to keep my notes as close to the code as possible. When I start on a new code base, I create a folder at the top called
aa_notes. Super obvious, and it makes an awesome scratch pad for things I don’t want to lose. So, how can you do this without checking your folder in to source control? Adding it to a local .gitignore is one strategy, but that change will also need to be checked in to git.
The answer is to use a global gitgnore.
You can configure a global gitignore file in your home directory that will ignore items in every repo on your machine.
1. Add a folder to your source control
2. Create a file and git will suggest to track it
1 2 3 4 5 6 7 8 9 10
3. Set up your global gitignore
4. Git will ignore all folders on your machine named aa_notes
1 2 3 4
This comes in super handy when you want to make clarifying notes to yourself without sharing them with all of your collaborators. Of course, if they are good things to share, you should probably add them to the project wiki.
I keep things like daily infobits, backdoor patches, bits of scripts, and other things. Sometimes writing a note about something helps me remember it a little better, so I still keep my own notes, even if the info is already on the wiki.
Checkout this post on GitHub for this and more ideas for fine tuning what git ignores.