6

Everytime I do git status there is this folder that appears as untracked.

$ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # src/error/ nothing added to commit but untracked files present (use "git add" to track) 

Even after doing git add ., git commit -a the folder at src/error keeps showing up as untracked. Other unstaged files get commited everytime only this folder keeps giving problems. Also git doesnt report any errors. What could be the problem here ?

8
  • 2
    Have you tried git add src/error/ ? Commented Aug 10, 2010 at 7:38
  • I tried that it didnt work i have a file in that folder i also tried adding that file directly didn't work also. Commented Aug 10, 2010 at 7:42
  • Did you try to add a specific file under src/error ? What do you have in your .gitignore file ? Commented Aug 10, 2010 at 7:55
  • 1
    Can you show us the command you run and it's output? Also the contents of your .gitignore file would be helpful. Best guess: try using the '-f' flag with git add. Commented Aug 10, 2010 at 8:01
  • For this project i am not using the exclude or .gitignore files. I ran $ git add . -f -v i did not get any output. Then i did git status and i got the same output as in the first message telling me that the folder is untracked. Commented Aug 10, 2010 at 8:19

3 Answers 3

6

I found the problem and the solution this is what happened:

First src/error was called src/Error when i changed the case locally the foldername was changed but in git it was still commited as src/Error. Windows is case-insensitive so what i did was remove the folder commit and add it again with the right casing.

Sign up to request clarification or add additional context in comments.

Comments

1

Is that the folder empty if so it is normal, see here

Comments

1

I've tried the following in a Windows 7 console and it worked, i.e. it did not show \src\error\ as untracked.

C:\t>dir Volume in drive C is BLAH Volume Serial Number is 2ECA-CB88 Directory of C:\t 10.08.2010 17:56 <DIR> . 10.08.2010 17:56 <DIR> .. 0 File(s) 0 bytes 2 Dir(s) 59'844'902'912 bytes free C:\t>mkdir .\src\error C:\t>copy con: .\src\error\text.txt blah^Z 1 file(s) copied. C:\t>git init Initialized empty Git repository in C:/t/.git/ C:\t>git add .\src\error\* C:\t>git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: src/error/text.txt # 

This doesn't answer your question, but I thought it might help to see a full step-by-step example.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.