2

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)

        ../../../../.VirtualBox/
        ../../../../.WebIde70/
        ../../../../.bash_history
        ../../../../.bash_profile
        ../../../../.bashrc
        ../../../../.codeintel/
        ../../../../.gitconfig
        ../../../../.hgrc
        ../../../../.ssh/
        ../../../../.vagrant.d/
        ../../../../AppData/
        ../../../../BullseyeCoverageError.txt
        ../../../../Contacts/
        ../../experiments/
        ../hyphenical/
        ../thecoremc/
        ../../../David Ponce              9.docx
        ../../../Development/
        ../../../Music/
        ../../../New Text Document.txt
        ../../../Passwords.txt
        ../../../Photoshop Tools/
        ../../../Recordings/
        ../../../desktop.ini
        ../../../laravel-blade.tmLanguage.txt
        ../../../question.PNG
        ../../../syudJMa.png
        ../../../~$vid Ponce              1.docx
        ../../../~WRL2005.tmp
        "../../../\302\265Torrent.lnk"
        ../../../../Documents/
        ../../../../Downloads/
        ../../../../Favorites/
        ../../../../IntelGraphicsProfiles/
        ../../../../Links/
        ../../../../Music/
        ../../../../NTUSER.DAT
        ../../../../NTUSER.DAT{bbed3e3b-0b41-11e3-8249-d6927d06400b}.TM.blf
        ../../../../NTUSER.DAT{bbed3e3b-0b41-11e3-8249-d6927d06400b}.TMContaine
00000000000000000001.regtrans-ms
        ../../../../NTUSER.DAT{bbed3e3b-0b41-11e3-8249-d6927d06400b}.TMContaine
00000000000000000002.regtrans-ms
        ../../../../OneDrive/
        ../../../../PUTTY.RND
        ../../../../Pictures/
        ../../../../Saved Games/
        ../../../../Searches/
        ../../../../Vagrantfile
        ../../../../Videos/
        ../../../../VirtualBox VMs/
        ../../../../_viminfo
        ../../../../coreessentials/
        ../../../../homestead/
        ../../../../ntuser.dat.LOG1
        ../../../../ntuser.dat.LOG2
        ../../../../ntuser.ini
        ../../../../website/
        ../../../../workspace/

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:

.env.*
/.idea
/vendor
.DS_Store
Thumbs.db
composer.lock
composer.phar

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.

0

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.