I have a personal GitHub repo that I want to use as a starting point for new projects = other repos. This might be very easy for you, but I'm really a beginner, so I hope you can help me with this.
If I make changes to that scaffold repo, I need the option to merge/rebase them into the projects that stem from it. So a GitHub template repo will not do the trick.
I'm thinking of the following solution:
- I have a template repo
username/template-repo - Create an empty repo (manually or via
git clone) - Create a new, empty branch
scaffold(so we havemain&scaffold) - Do a
git remote add, so that thescaffoldbranch contains exactly the contents of thetemplate-repo - Merge or rebase the local
scaffoldinto themainbranch - Work in the
mainbranch and make commits.
If I want to get the new contents of the template-repo, I'd do sth like this:
- Git pull
template-repointoscaffoldbranch - Merge or rebase the
scaffoldbranch with themainbranch
I understand how Git works and I know what I need, but I just have difficulty setting this all up. I'd be very grateful if you could point out how I'd do this.
Thanks a lot!