Search code examples
gitgithubtodo

Is there a way to collect all the TODO in the code in one file before push


I want store all my TODOs in the code on github, but also I want collect it in one file so I can show them all in one place to my colleagues. Maybe someone solve this task already? With git hooks maybe?


Solution

  • Well, if you have some specific pattern for your TODOs you can simply grep them.

    grep -R TODO . > todo.txt
    

    The next step is to decide when you want this file to be updated. If you want this to happen before push, you'll need at least git 1.8.2, since pre-push hook was added in this release.