I ran in to this particular situation
I did a git clone on a new folder on my local for the master branch , when I do git status it shows
modified: sites/all/themes/DIR/css/style.css
# modified: sites/all/themes/DIR/css/style1.css
# modified: sites/all/themes/DIR/css/style2.css
# modified: sites/all/themes/DIR/css/style3.css
# modified: sites/all/themes/DIR/css/styleResponsive.css
# modified: sites/all/themes/DIR/favicon.ico
# modified: sites/all/themes/DIR/greysliver.png
# modified: sites/all/themes/DIR/less/bootstrap.less
# modified: sites/all/themes/DIR/less/content.less
# modified: sites/all/themes/DIR/less/footer.less
# modified: sites/all/themes/DIR/less/header.less
# modified: sites/all/themes/DIR/less/overrides.less
# modified: sites/all/themes/DIR/less/style.less
# modified: sites/all/themes/DIR/less/variables.less
# modified: sites/all/themes/DIR/logo.png
# modified: sites/all/themes/DIR/screenshot.png
# modified: sites/all/themes/DIR/template.php
# modified: sites/all/themes/DIR/templates/page.tpl.php
I am confused with this behavior, how can a fresh git clone bring unstaged changes with it.
Some background:
I had actually copied
sites/all/themes/DIR
as
sites/all/themes/dir
so now when I try to remove the shown status DIR files, it starts showing me sites/all/themes/dir files in the modified status even though I do not remove that directory.
I tried doing a checkout on these files as well as git reset . and git clean -f , this did not change anything Also the git stash way did not work. I am unsure why a clean checkout might be doing this except that it keeps referring to another folder where the original repo was on my local.
How to fix this scenario and not have any unstaged files on a fresh checkout.
This is on Mac OSX 10.9.4, files were committed from ubuntu and are hosted on ubutu.
git ls-tree master^{tree} sites/all/themes/
shows
040000 tree 7de9d4fc327d8e3087dc566d2a4b1602d45114e1 sites/all/themes/DIR 040000 tree b5b51e2e760ef42632270bc19554f5164c151718 sites/all/themes/dir