Mirror repository while keeping changes I add

I mirrored a repository and I want to add a gitlab-ci.yml file, but if I do, its diverged from upstream and I can’t pull anymore without losing it. Is there a good way I can keep my changes and regularly merge from upstream?

Late to the party, but have you found the solution?