My git controlled files cannot revert -


whenever run git commit or git status, there files never changed before pop showing modified. checkout/revert these files, not work. git diff shows no difference.

i notice whenever run git checkout or git revert on file not changes, modify time changes.

is there way can revert these unchanged file origin state?

below git bash output, remove outputs because many files in incorrect state. can see file 'repositories.config' cannot revert.

welcome git (version 1.9.4-preview20140611)

run 'git git' display index. run 'git ' display specific commands.

[myaccount] /d/git/tour/visa/order/visa.order.main/packages (release)

$ git status

on branch release branch up-to-date 'origin/release'.

changes not staged commit: (use "git add ..." update committed) (use "git checkout -- ..." discard changes in working directory)

    modified:   repositories.config 

no changes added commit (use "git add" and/or "git commit -a")

[myaccount] /d/git/tour/visa/order/visa.order.main/packages (release)

$ git checkout .

[myaccount] /d/git/tour/visa/order/visa.order.main/packages (release)

$ git status

on branch release branch up-to-date 'origin/release'.

changes not staged commit: (use "git add ..." update committed) (use "git checkout -- ..." discard changes in working directory)

    modified:   repositories.config 

no changes added commit (use "git add" and/or "git commit -a")

finally found file .gitattributes changed git behavior. file includes below line: * text=auto, automatically normailize line endings. comments line '#', goes fine. check http://git-scm.com/docs/gitattributes more details.

set string value "auto"

when text set "auto", path marked automatic end-of-line normalization. if git decides content text, line endings normalized lf on checkin.

actually there many things can affect git behavior on line endings check. git config: core.autocrlf, core.safecrlf, core.whitespace. if encounter such similar problem, can check these aspects.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -