Alex Rivera | Logout

Problem with modified files showing up in Git but not updating?

Asked 2011-03-03T20:49:59.197
9

I've got some files/folders that just wont leave the Git staging area?

# 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:   JavaScript/Stand.ard.iz.er (modified content, untracked content)
#   modified:   Site (untracked content)
#   modified:   Template Archives/Template (modified content, untracked content)
#   modified:   Template Archives/Template_Git (modified content, untracked content)
#

I've tried everything to get these 'modified' files commited but with no luck?

I've tried...

git add .
git add *
git add -u
git add {actual full directory path}

...but none of it works.

Any ideas?

Thanks.

Edit
Report

1 Answer

11

This could happend if you've copy some new folder to your project which have already a .git folder inside. So it will be like a sub repository in your main repository. The solution is just delete this .git folder in your new copied sub folder.

answered 2011-03-08T02:12:54.697

Your Answer