Import common files from another project on GitLab

I want to import the files that are shared in my two projects on gitlab from another project. For example:

Common Project (includes xxx.c)
Project1 (includes code1.c, code2.c and xxx.c)
Project2 (includes code4.c, code3.c and xxx.c)

if I change the xxx.c in project 1, I want it to change in the common project, so it must have changed in project 2 as well. If it’s possible how can i do it?

I expecting If it’s possible how can i do it?