Should the main (or master) branch be completely unchanged by me and always synced with the original?
tl;dr There's no need to maintain a "clean" main
in a fork. Use origin/main
.
If your forked version is just for the purposes of contributing back to the upstream project, leave main
alone. Work in branches, issue pull requests to the upstream project, wait for them to be accepted, then git pull
to update your main.
If you intend to use your forked version, then do the normal feature branch workflow on your project. Branch from main, work in branches, and merge them into main (it's often useful to use PRs even in personal own projects).
Upstream's version of main
can be gotten from its remote tracking branch, origin/main
. You can branch from this if you want to work on a "clean" contribution. You can git fetch origin
to update origin/main
. When you want to incorporate updates from upstream, you can git pull
or merge origin/main
into main
.
It requires some changes to be made to it to allow the project to be built on my machine and then be deployed to my testing device.
These changes should be offered upstream. Or make an issue showing their project configuration is not flexible enough to accommodate your setup without code changes.