Git Ignore files when make a pull

前端 未结 2 591
醉梦人生
醉梦人生 2021-01-14 07:47

I am new at github and I am developing an app that has a config.php file that you must enter the database credentials.

In my github repository the file

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-14 08:44

    .gitignore is for ignoring untracked files, but you need to ignore changes in the tracked one. you could use git update-index --skip-worktree /path/to/config.php

    See https://git-scm.com/docs/git-update-index#_skip_worktree_bit

提交回复
热议问题