I want to work on my repo in private using GitLab but keep a public copy of the master branch on GitHub for visibility and accessibility purposes. Is it possible to 'automate' the mirroring of the master branch of both the GitHub and GitLab remotes, but retain the commit history in the GitLab whilst squashing commits down to a single commit with the GitHub one (without having to remember to manually do this each time)?
This might be a bit of a far-fetched request, but git continues to amaze me with how powerful and flexible it is!