Programmatically syncing a fork's `master` with the parent repo's
Scenario:
- You have fork F of parent repository A
- You work in branches in F, never touching
master
- You want to keep F.master in sync with A.master programmatically, at regular intervals (maybe hourly or daily)
Is there any way to do this with GitLab's API, without needing to run a bunch of git pull/push commands to the different origins?
In GitHub, there's this "one weird trick" where you can simply PATCH the F.master commit with A.master's commit and it works. If it's not a fast-forward then there's the option to force commit.
I tried the same trick with GitLab but it doesn't work. Is there any other series of API commands I could run to achieve the same? In short, I just want to keep my fork's master
in sync with the parent's master
, without having to do full git commands like clone pull and push.