github - How does git ignore files locally and keep files with the same name on the remote end?
仅有的幸福
仅有的幸福 2017-05-02 09:30:06
0
5
630

The same project A is developed by multiple people, but there is a config.php configuration file in project A. Different members have their own database environments. How to ensure that other members modify the local configuration file without submitting it, or submit it but Not overwriting the remote config.php?

仅有的幸福
仅有的幸福

reply all(5)
为情所困

Create a config.simple.php file, and then add the config.php file to gitignore, so that after different developers clone the code, they can change config.simple.php to config.php and replace it with their own configuration, like this It will not affect others just because someone changes the configuration

黄舟

gitignore

Ty80

gitignore file writing rules…

为情所困

The topic can be summarized: In a distributed environment, how can files ignored by oneself not affect others
Using .gitignore files is not satisfactory, because .gitignore files will also be distributed to others along with the warehouse
It is best to control this file yourself

Then
you might as well try: git config --global core.excludesfile $yourfilepath

仅有的幸福

.gitignore

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template