Git refuses to reset/discard files

前端 未结 4 1622
不思量自难忘°
不思量自难忘° 2020-12-04 06:57

I have a project with certain js files which I cannot update. I run OSX locally and my remote/staging server is Linux (CentOS).

Right after cloning my project locall

4条回答
  •  自闭症患者
    2020-12-04 07:29

    I just spent 2 hours (!) on the same issue with a .svg file (Scalar Vector Graphics), which kept changing after 'revert' without my intervention.

    So the file shows up as modified in 'git status'; reverting it succeeds, but it keeps changing, so the 'pull' is failing again and again.... so annoying!

    No luck with 'git reset', 'git ignore', 'git untrack' etc...

    Finally, I solved it by removing the file from my local system (not 'git delete', just Shift + Delete) >> now 'pull' request passes, and the file is fetched from the remote repository.

    So easy, I could cry!

提交回复
热议问题