Is there any way to share just certain files in a repo for others to checkout/edit

Lets say you have a VS solution for a website. There are multiple projects in this solution and the whole thing gets pushed up to GitLab.

But one of these projects is the website. And within that website there are both web pages and the code behind.

What I am curious about… is if it is possible to create like a sub branch containing just pages I specific (or say *.aspx) and share that “sub branch” with someone who works on just the front end code, but I don’t want them even seeing the backend code.