Git Pull While Ignoring Local Changes?

前端 未结 12 1764
醉话见心
醉话见心 2020-12-04 04:29

Is there a way to do a git pull that ignores any local file changes without blowing the directory away and having to perform a git clone?

12条回答
  •  自闭症患者
    2020-12-04 04:57

    .gitignore

    "Adding unwanted files to .gitignore works as long as you have not initially committed them to any branch. "

    Also you can run:

    git update-index --assume-unchanged filename
    

    https://chamindac.blogspot.com/2017/07/ignoring-visual-studio-2017-created.html

提交回复
热议问题