Skip to content

Working with branches

Alberto Pérez García-Plaza edited this page Oct 31, 2021 · 1 revision

The development on this fork takes place using the branch rk3128-wx8.

Our goal doing this is to keep our working branch updated from upstream and our commits placed on top in order to have a clean branch that will allow us to send a Pull Request upstream whenever we decide we have a stable version to support a new console.

To sync the branch with new changes from Upstream we suggest following the next steps:

  1. Update origin/master with git fetch upstream
  2. git merge upstream/master (there shouldn't be any conflict because we are merging the changes of a branch we don't touch).
  3. git push origin master to update our remote with upstream changes we just locally merged.
  4. Change to rk3128-wx8 branch: git checkout rk3128-wx8.
  5. git merge master to merge the changes from our master that are still missing in this branch. As we have changes that are not included Upstream, a merge commit will be needed because our changes will be mixed with upstream ones. Even though this doesn't happen, we need to execute git rebase -i master and select our commits with the pick option (they will basically be all the commits displayed). This way we sort the tree to place our commits on top of the Batocera upstream changes.

In case we add commits to master by mistake, we can follow the same procedure dropping the commits instead of picking them. Of course, make sure those commits are safe in another branch or you could end losing them. Specific instructions on how to do it depend on the case as you may need to merge them to rk3128-wx8 branch before dropping them from master. In case of doubt, execute git checkout -b my-backup-branch and check the history with git log --graph (add --oneline for a more compact view if needed) before starting dropping stuff.

Clone this wiki locally