Another trick is to use an independent branch, checked out in a subtree of your project, as Junio Hamano (the current Git maintainer) does with Git's todo. Cookbook:
$ cd project/
$ git branch
* master
$ git init META
You can now create your “To Do list” and other files in META/
$ cd META/
$ echo '* Item 1' > todo.org
$ git add todo.org
$ git commit -m 'Initial version of TODO file'
[master (root-commit) 64748ba] Initial version of TODO file
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 todo.org
Let's change the branch name to meta
, too, and push it back to the main repository:
$ git branch -m meta
$ git push .. meta
You will have to remember to push the branch back after each commit; setting up a post-commit hook may be in order.
META/
now shows up as an untracked file in the main repository; let's ignore it locally:
$ cd ..
$ git status
# (Shows META/ as untracked)
$ echo META/ >> .git/info/exclude
You can now switch branches at will, and META/
will stay untouched—as long as the branch you are switching to does not include a conflicting path, of course.
The main repository now contains an additional, totally independent branch, which can be pushed and pulled as any other part of your project:
$ git branch
* master
meta
$ gitk --all