I wanted to check if someone with more experience around contributing to the core could help me out with a “situation” where I often find my self.
So.
I have my fork of Umbraco. I’m working on something in a feature branch. I think I’m done so I push my branch to my fork in Github and create a PR to the upstream Umbraco-repository.
Some problem show up, while working on the fixes and I find my self needing changes from the main branch in my feature branch.
I can think of three ways of handling this situation but I’m not sure which one that is preferred, or if it even matters?
Rebase my branch and force push
Merge main into my branch
Cherry Pick commits changes from main into my branch
1 or 2 is what most people do, you can’t do #3 as it will mess up the compare between the remote main and your branch.
I probably would prefer to do #1. You can set an extra git remote being the HQ repo, and then pull from that periodically from our main to your main. Then use a rebase on your branch that you’re working on, force push to update the PR. It’s the nicer option as it keeps the commit history pretty linear and we don’t have to deal with (many) merge conflicts when merging the PR in the end.