I have three projects in my /rails directory: test_app/, dma4/ and test2_app/. I am currently working in the test_app/ directory (which is already initialized for git) and committed the changes. After commiting, I did a ‘git status’ to see the changes. For some reason it tells me that there are no changes, EXCEPT for ../dma4 and ../test2_app which are other projects!!
Why would it tell me about changes outside of my current project?? I shouldn’t have to ignore other projects in my .gitignore file…
Here’s the exact message:
test_app $ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
# (commit or discard the untracked or modified content in submodules)
#
# modified: ../dma4 (modified content)
# modified: ../test2_app (modified content)
#
no changes added to commit (use "git add" and/or "git commit -a")
test_app $
These other projects are not subfolders for the current project, here’s how the heirarchy looks:
rails/test2_app
rails/dma4
rails/test_app
Why would it do this??
You initialized your Git repository one level too high up in the directory tree. If you go up a level and do an
ls -a, you’ll probably see a.gitthere.Try going into the actual folder of your project and doing
git initthere instead.