Python task manager from scratch, part 6: Adding a .gitignore

When you put the veery/ directory under version control, git started to track changes to all the files in that directory. But there will be files in that directory that you don't want to track and commit to the GitHub (or wherever else) version of the repository.

There is a mechanism to handle this: the .gitignore file. Documentation about it is here. A variety of community answers to the question "What is .gitignore?" is here.

What I did at this stage is:

  1. Use my text editor of choice to create and edit a file named .gitignore in the veery/ directory;
  2. Add a few lines to it, telling it to ignore files with certain extensions (swap files that my text editor creates and .pyc files that Python makes);
  3. Run git add --all;
  4. Run git commit -m "Add a .gitignore";
  5. Run git push origin master.

The results are at this commit in the veery/ repository.

Eventually I will stop retyping this but I fear that readers might not have absorbed this yet: None of this is supposed to be immediately intuitive. I am doing things in the order I'm doing them because I am actually making this project and believe this is roughly the right order to be doing things in. I am relying on external documentation heavily.

Good luck!


Next post: Python task manager from scratch, part 7: Adding and removing tasks


Home page