Exclude specific files from 'git pull'

后端 未结 2 533
灰色年华
灰色年华 2020-12-03 04:50

I have a production git repo that I only pull changes from the main repo into; I never change this repo or do commits/pushes from here. I recently accidentally pushed some u

2条回答
  •  半阙折子戏
    2020-12-03 05:02

    This allowed me to tell git to ignore a specific file, even though it was already part of a project. All changes I make to it will be ignored:

    git update-index --assume-unchanged Localization/el-GR.js
    

    Source: http://codethug.com/2013/09/20/4-ways-to-ignore-files-with-git/

提交回复
热议问题