I've just added a new git repo on my machine and I've noticed an extremely messy git status. It's showing a bunch of files from my desktop, c:/, basically almost everywhere. It's going outside the project folder for some reason and I'm just flustered. I've ran git clean -xf to see if that cleaned up my git status and it has not.

If this is normal behavior, please let me know.

David@PERSONAL ~/Desktop/Code/projects/laraforum (master)
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../../../David Ponce              9.docx
        ../../../New Text Document.txt
        ../../../Photoshop Tools/
        ../../../~$vid Ponce              1.docx
        ../../../../Saved Games/
        ../../../../VirtualBox VMs/

nothing added to commit but untracked files present (use "git add" to track)

I ran this inside of a clean installation of laravel. Here's the git ignore:


I don't know if this is something wrong on my part or with the way I have git set up.

My project folder contains a clean laravel installation.

Edit: When I ran a git init in my project folder, the git status did not show all the untracked files outside of the repository.


Under Windows, pop open a cmd.exe, and run

dir \.git /s /p

Now read the path of each folder it finds, and ask yourself if that .git folder really needs to be there.

Git allows you to cd into your project and run git commands. It seeks a .git folder in the current folder, and it then checks each parent folder, on up. (By contrast, Subversion requires a .svn folder in every committed folder, which is very unwieldy.)

  • The command didn't work. Invalid switch - ".git". – David Oct 5 '14 at 22:14
  • Fixed in the current answer – Phlip Oct 26 '14 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.