Push subdirectory to another branch with CI

I have the following setup:


  • develop
  • release
  • master

On the develop branch I have the following structure:


  • actual project dir
    – .gitignore
    – Readme.md
    – …
  • puphpet
  • .gitlab-ci.yml
  • Readme.md

When pushing to develop I want only the “actual project dir” to be pushed to the release branch.

Is that something that’s inbuilt somewhere? Or even reasonable to do? Should I maybe change something about the structure of both branches and project?