I'm trying to push to my GitHub repo. But I get the following error:
Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
I think it has to do with a /config/config.json file. This file is inside my .gitignore, but I added it for once and for all manually on the GitHub website and removed the passwords inside it. The pull command gives me this error:
The following untracked working tree files would be overwritten by merge:
config/config.json
Please move or remove them before you can merge.
But I don't want to remove it, because it is an essential file in the repo. I read on the internet I should try push -f, but this removes that file from my repo completely. How can I push my next changes to other files, without having to worry about this config.json file?
Thanks in advance,
Erik