Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6790373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:43:04+00:00 2026-05-26T17:43:04+00:00

I am working in a submodule and am having trouble untracking a folder full

  • 0

I am working in a submodule and am having trouble untracking a folder full of files

$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
    #   modified:   public/javascripts/app/fckeditor/editor/skins/office2003/fck_dialog.css
    #   modified:   public/javascripts/app/fckeditor/editor/skins/office2003/fck_editor.css
    #   modified:   public/javascripts/app/fckeditor/editor/skins/silver/fck_dialog.css
    #   modified:   public/javascripts/app/fckeditor/editor/skins/silver/fck_editor.css
    #   modified:   public/javascripts/app/fckeditor/fckconfig.js
    #   modified:   public/javascripts/app/fckeditor/fckeditor.js
    #   modified:   public/javascripts/app/fckeditor/fckpackager.xml

I type

git reset --hard

which returns

HEAD is now at b2c5a77 nothing

However when I type

git status

I am again greeted with the long list of files. I have tried to

git clean -f 

and also removed the entire submodule and checked out from the master server.
I have also tried to delete the entire project whom the submodule belongs to, pulled that and then initiated and updated the submodule but to no avail.

rm -rf project
git clone foo@bar.project.net:/home/rails/repo/gits/project.com
#Cloning into project...
#remote: Counting objects: 2452, done.
#remote: Compressing objects: 100% (2040/2040), done.
#remote: Total 2452 (delta 1238), reused 582 (delta 145)
#Receiving objects: 100% (2452/2452), 561.32 KiB | 438 KiB/s, done.
#Resolving deltas: 100% (1238/1238), done.
cd project.com
git submodule init
git submodule update
#Cloning into vendor/plugins/project_engine...
cd vendor/plugins/project_engine
$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   public/javascripts/app/fckeditor/editor/skins/office2003/fck_dialog.css
#   modified:   public/javascripts/app/fckeditor/editor/skins/office2003/fck_editor.css
#   modified:   public/javascripts/app/fckeditor/editor/skins/silver/fck_dialog.css
#   modified:   public/javascripts/app/fckeditor/editor/skins/silver/fck_editor.css
#   modified:   public/javascripts/app/fckeditor/fckconfig.js
#   modified:   public/javascripts/app/fckeditor/fckeditor.js
#   modified:   public/javascripts/app/fckeditor/fckpackager.xml

The only thing that seems to remove the files is if I log on as another use on my Mac, which makes me think its a problem my local machine and not the repo itself.

I have also tried to uninstall and reinstall GIT and am currently running 1.7.5.4 install and complied with the help of brew (Ruby package manger).

How do I remove these files from git status?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:43:05+00:00Added an answer on May 26, 2026 at 5:43 pm

    I agree with Richard that this could stem from a case sensitivity/insensitivity problem. I will address that issue with this answer.

    Problem

    If a git commit contains two files whose names differ only in case, checking out that commit to a working directory in a case-insensitive filesystem causes problems. If the commit contains, for example, myfile and myFILE, git will create myfile, and then when it goes to create/update myFILE, the filesystem gives it a handle to myfile.

    This becomes apparent if myfile and myFILE have different contents in the repository. When checking out the files, the second one “wins” and the physical file contains the contents of the second file. When you do git status, the two files in the index both get compared to the same file in the working directory, and for the losing file, the contents don’t match.

    Verifying the Problem

    You could checkout the repository on a case-sensitive system to analyze and resolve everything there. Alternatively, git does provide enough tools to deal with this on your current system.

    The easy way to see if this is really the problem, is to make a trivial modification to one of files listed. Then, running git status should show both variants of the filename, since the working dir version does not match either version in the index:

    $ echo >> public/javascripts/app/fckeditor/fckpackager.xml
    $ git status
    Possible outcome:
    # On branch master
    # Changes not staged for commit:
    #   (use "git add <file>..." to update what will be committed)
    #   (use "git checkout -- <file>..." to discard changes in working directory)
    #
    #   modified:   ...
    #   modified:   public/javascripts/app/fckeditor/fckpackager.xml
    #   modified:   public/javascripts/app/fckeditor/FCKPACKAGER.xml
    

    Or, you can also use git ls-files to see what’s in the index:

    $ git ls-files public/javascripts/app/fckeditor/fckpackager.xml
    public/javascripts/app/fckeditor/fckpackager.xml
    public/javascripts/app/fckeditor/FCKPACKAGER.xml
    

    If you want to see exactly what is in each file, you can use git checkout-index to pull a file out of the index and save it somewhere (using a prefix so contents are written to separate files):

    $ git checkout-index --prefix=v1/ public/javascripts/app/fckeditor/fckpackager.xml
    $ git checkout-index --prefix=v2/ public/javascripts/app/fckeditor/FCKPACKAGER.xml
    

    Resolution

    Once you have figured out which variant of each file you want to remove, you can remove it from the index using git rm --cached, which respects the case of the paths given to it:

    $ git rm --cached public/javascripts/app/fckeditor/FCKPACKAGER.xml
    

    then commit, and if necessary do another git reset --hard


    However, your comment about logging in as a different user and getting different result indicates there might be a different problem. That being the case I would see if there are any differences in the user-specific .gitconfig files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to figure out why git submodule foreach command is not working for
Working on this page: http://www.karlsenner.dreamhosters.com/about.php and having trouble with the navigation in IE6. It
I've added a submodule in my main git folder tree and haven't changed anything
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working with printf in a bash script, adding no spaces after \n does not
I added two submodules to my vim repository, and the git status command always
In Git, how can I organize work to track local config files of a
I have created a git repo in a folder that had spaces and some
I added PHPUnit to a project via git submodule add per the instructions in
I have a git repo as my master project. It has some sub-modules added

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.