Document keeping forked repos updated
Summary
Keeping forked repos and branches within those repos is a real pain and can be easily forgotten.
GitLab allows the ability -- which the RTEMS Project has enabled the feature of repository mirroring it does increase load to the instance however.
With this you can automatically keep your forks updated. RTEMS does not allow direct pushing to repositories so the flow is always:
graph TD
A(RTEMS Repository)
-->B(Repository Mirroring)
-->C[/Forked Repository\]
The branches you keep on your forked repo will remain intact but your forked repo will always be up-to-date.
@chris made a summary of what to do on `#gitlab-support` on Discord.
- Select the fork in your personal area
- Left side at the bottom select Settings then Repository
- Expand Mirroring Repositories then click Add
- The Repository URL is the upstream repo's HTTPS Code button URL
- Select Pull and leave the Username and Password empty.
- Click Mirror Repository
- Go into
Protected branches
- Set
Allowed to push and merge
toNo one
This will ensure you don't accidentally push to your main branch on a personal repo.
- Set
Notes
- Please do not mirror repositories that are not on our GitLab instance without asking in
#gitlab-support
- You can mirror a single branch from a repository in fact you can mirror from several different upstream branches onto a single repository.
Steps to reproduce
Edited by Amar Takhar