Project Based Notes
I’m always creating plain text / Markdown personal notes/todos on my Desktop that I either forget about or let get stale.
I’ve never put those notes in the project themselves as I fear I’ll accidentally check-in those which are only ever relevant to me, and I don’t want to constantly append to the project .gitignore
when it’s only relevant to my way of working.
Welcome, .gitignore_global
.
Run this with bash and you’ll be able to have a notes.txt
file in each project root without that fear:
if [ ! -f ~/.gitignore_global ]; then
echo "File not found!"
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
fi
echo 'notes.txt' >> ~/.gitignore_global
Whilst we’re on the subject, can we start adding more stuff to this that is only relevant to your machine or environment? E.g. If you’re the only developer using VS code, don’t clutter the repository, ignore it globally instead:
echo '.vscode' >> ~/.gitignore_global