GitLab branch replication from the same origin

I’m currently using the free GitLab version to host my project’s repos. No GitLab software is being used on my production servers. Before I get into my problem, I want to layout my current development setup.

Local app (push to–>) Dev branch (merge to–>) Stage branch (testing) (merge -->) Master (run script on successful pass that merges with production server)

Can I have my Stage branch automatically copy everything that is pushed to the Dev branch? Kind of like a post-receive hook to checkout the contents? The Stage branch will serve as a spot to test the app live, then if things are good there I would merge to the Master branch which push to my production server.

Is this possible to do on GitLab’s hosted repos? Or is this only possible on the self hosted version? If yes to the self hosted way, is there a way to achieve this without moving GitLab to the self hosted version?

You could make a hook that would watch for a push to the dev branch and then open an MR into the staging branch, and this should be possible on The problem is that this could cause significant issues with merge conflicts and such.

I guess the question is: Why have separate dev and staging branches at all if they’ll have the same contents anyway?