# git add after changing a submodule

1 messages from 2008-04-04 to 2008-04-04. Participants: Pat Maddox.
Thread: https://gitlist.dev/t/12987

## Pat Maddox, 2008-04-04 20:50

Subject: git add after changing a submodule
Message-ID: <810a540e0804041350u7fe4a5c4t7e86274e188e3e91@mail.gmail.com>
URL: https://gitlist.dev/e/810a540e0804041350u7fe4a5c4t7e86274e188e3e91%40mail.gmail.com

```
If I make a change to a submodule and commit it, I then have to add it
to the parent repo.  If I do

git add path/to/submodule

then it works fine.  But if I do

git add path/to/submodule/ (with trailing slash)

then it blows away the submodule and adds all the files in that directory.

Seems pretty dangerous to me.  I know that I can just use git commit
-a to do it, but I'd like to prevent the mistake of adding the path
and screwing up the repo.  Is it possible to protect the submodules a
bit more?

Pat

```
