How to make Git ignore changes I'm making to a file (under source control)?

前端 未结 2 428
暖寄归人
暖寄归人 2021-01-28 17:35

I am using git for big web application. At my local end I want to make few files unchanged during work flow of git. For example there is database and config files which have dif

2条回答
  •  春和景丽
    2021-01-28 18:13

    Use the .gitignore file for this. Such files like database configurations or folders with changing files should not be included in the git repository.

    In most cases you can create a template file like

    database_config.txt_template

    and commit that file in your git repo. When a new user install that project he can rename the file and can change the settings.

提交回复
热议问题