linux
Wordpress Git
Modified Files
Solution to git cloned wordpress complaining about modified files even though no modification has taken place.
After cloning wordpress and checking out the desired branch:
CHARITY-D->/var/www/html#-search)`reset': git reset --hard origin/3.8-branch
HEAD is now at 831b3ca 3.8.1
The status, oddly, shows modified files.
CHARITY-D->/var/www/html# git status
# On branch 3.8-branch
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: license.txt
# modified: wp-content/themes/twentyfourteen/images/pattern-dark.svg
# modified: wp-content/themes/twentyfourteen/images/pattern-light.svg
# modified: wp-includes/images/crystal/license.txt
# modified: wp-includes/js/jquery/jquery-migrate.js
# modified: wp-includes/js/jquery/jquery-migrate.min.js
#
no changes added to commit (use "git add" and/or "git commit -a")
There is evil in allowing crlf, but we won't be able to convince the wordpress development community to fix this, so we will have to stop our holy war against bad returns for now.
CHARITY-D->/var/www/html# git config --global core.autocrlf false
Now with
removed, git knows no changes have taken place.
autocrlf
CHARITY-D->/var/www/html# git status
# On branch 3.8-branch
nothing to commit (working directory clean)
Last Updated: 2014-03-15 07:07:48