Welcome to Shaun Luttin's public notebook. It contains rough, practical notes. The guiding idea is that, despite what marketing tells us, there are no experts at anything. Sharing our half-baked ideas helps everyone. We're all just muddling thru. Find out more about our work at bigfont.ca.

The Most Useful Git Commands

Tags: git

Stop tracking an entire directory. This is useful after having added the directory to .gitignore.

git rm -r --cached <your directory>

  • rm
    • Remove files from the working tree and from the index.
  • -r
    • Allow recursive removal when a leading directory name is given.
  • --cached
    • Remove files from the index only (not the working tree).