Can't seem to discard changes in Git

后端 未结 20 1333
傲寒
傲寒 2020-11-29 21:17

After seeing the following from the command line:

# On branch RB_3.0.10
# Changed but not updated:
#   (use \"git add ...\" to update what will b         


        
20条回答
  •  自闭症患者
    2020-11-29 21:53

    For me this issue came up with a combination of downloading an Git-LFS image that was uploaded via Netlify CMS and served differently by their Netlify Large Media handler.

    My solution was to comment out/remove these rows from my ~/.gitconfig so that they look like below, and then checking git status again.

    # [filter "lfs"]
    #   clean = git-lfs clean %f
    #   smudge = git-lfs smudge %f
    #   required = true
    

    OR you can probably add a more local filter via a .gitconfig in the repo root and somehow overwrite the filter rules for lfs there.

    Hope this helps a fellow out.

提交回复
热议问题