Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keeping git from requiring commit of changes

Tags:

git

We have several config files in a project that 3 people are working on. However, those config files contain several lines that differ for each of us and so should not be changed or overwritten by commits. Yet Git won't let us pull changes from the other people unless we commit those config file changes which then means that it changes the other members configs again.

Being new to Git it seems that we either need to create branches and merge them every commit to update our code - or use .gitignore. What is the proper way to handle this situation? We all need constant access to the changes that the other members make.

like image 522
Xeoncross Avatar asked Dec 02 '22 07:12

Xeoncross


1 Answers

Don't check in the config file.

If need be you could have a config.example, which each of you copies to an untracked config file - this is how most projects handle this.

like image 177
bdonlan Avatar answered Dec 03 '22 23:12

bdonlan