How to correctly edit configuration for circleCI

Since the config.yml is not part of the .gitignore, how can i make changes in the circleCI configuration that will not lead to a conflict when the process of keeping our fork of the project up to date is to be automated?

There is no straightforward way to do this. But a reasonable approach is to maintain the changes in a git .patch file and apply the patch every time you update the repo.

But even then, the .yml file always keeps changing so there will be conflicts eventually.

And actually we have moved away from CircleCI to GitHub Actions.