Prevent local changes getting pushed in Git

前端 未结 4 1534
灰色年华
灰色年华 2020-12-04 07:06

I have cloned a repository and the master branch in my repo is tracking origin/master. I created a work branch and changed some config

4条回答
  •  情书的邮戳
    2020-12-04 07:54

    If you want to prevent committing (therefore also pushing) these local config files, you could use git update-index --assume-unchanged. Files marked with this flag will be assumed to never change (until you reset the flag with --no-assume-unchanged)

提交回复
热议问题