0

I am having trouble getting subdirectories to update to commit so I can push them.

My main directory is projects and this is where I created my init to manage a few small projects into one git repo.

I created a directory and a virtualenv and put it into git.

so currently I have

-Project
        ->flask-blog/
                    fb/
                      /bin
                      /include
                      /lib

I then added blog.py and a static and templates directories into my folder.

-Project
        ->flask-blog/
                    fb/
                       /bin
                       /include
                       /lib
                    static/
                    templates/
                    blog.py  

I then added them to git from the project folder.

git add .

But that didn't work, well it added blog.py but not the new directories. So I tried.

git add -A

and

git add *

and

git add flask-blog/*

but none of these have worked how to I get git to notice my new directories?

Wooble
  • 87,717
  • 12
  • 108
  • 131
sayth
  • 6,696
  • 12
  • 58
  • 100
  • 3
    Git never tracks directories, only files; this is nothing Python specific. Put dummy files in such directories if you want them to be added to the git repo. – Martijn Pieters Apr 28 '14 at 10:07
  • @Martin Pieters. Thanks why would git not do something so basic? – sayth Apr 28 '14 at 10:17
  • 2
    Because directories don't need tracking; there are no versions of directories, only versions of files contained in directories. – Martijn Pieters Apr 28 '14 at 10:18

0 Answers0