Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork28
Description
Since cores are now automatically generated by CI, in release 0.3.2 we cleaned up the Git history of the repo by removing all references to old build files in thevariants
andfirmwares
folders (as the last step of#102). We pushed the new, slimmed down commits to the more traditionalmain
branch.
All future work will now take place on themain
branch.PRs that targetarduino
will not be accepted anymore and will have to berebased onmain
. No further work will be done on thearduino
branch and it will be removed in the short future.
😵💫 So what should I do..?
If you are just getting started and downloaded this repo after release 0.3.2, there is nothing special you have to do. Just start your work from
main
as you normally would. 🚀If you downloaded a copy of the repository in the past, but never created any commit yourself, it's also really easy. Simply do a
git fetch
to download the latest updates, then checkout themain
branch and continue using that. 🚀If you have local branches or commits that you want to keep up-to-date, and/or have submitted a PR that is still open, please read on. 🔧
🔧 How to fix your existing branches
Note
There are many ways to fix this with Git. The following describes thecherry-pick solution, but of courseinteractive rebase is OK too - just read the section below for what to expect when trying such a tricky operation.
The following also assumes:
- you have a branch named
feature
which was based off thearduino
branch - the
origin
remote refers to this repository.
To migrate a branch calledfeature
on the newmain
:
Make sure you have downloaded the latest version of the
main
branch from this repository:git fetch origin
Take note of the checksums for your old commits on the
feature
branch.Run the following command, and it will showall commits in the
feature
branch, starting from the most recent one:git log feature
The first ones (near the tip) will be yours, then the log will show other commits that were on the
arduino
branch at the moment you created your own. Copy the 40-char commit IDs ofyour commits to a temporary text file. Make sure to list them in the same order they are shown!Create a new
feature-on-main
branchgit checkout -b feature-on-main origin/main
will create a new branch called
feature-on-main
from the latest commit onmain
, initially with no commits. Note theorigin/
part - we need to start from the latestmain
, not old local copies you may have.Re-apply the commits in this new branch.
Walk the list you createdin reverse order, so the oldest is used first (very important!), and apply each commit in your new branch:
git cherry-pick<commit-id>
All those commands should complete with no errors. When every commit has been applied, you will have a brand-new branch to continue your development from. If this was a PR, please open a separate PR and link the old one.
⚠️ HELP! I gotconflicts during the cherry-pick operation
This means that something was changed since the time you created your branch. You need to review the files with the conflicts and fix the changes highlighted by<<<<<
and>>>>>
, before committing them. Read more on thathere, for example.
Note that if your branch modified the files that have been removed (like old rebuilds did), you should remove them, not add them again. 😉
🧯 HELP! I did arebase
,pull
, or something... and now everything is on fire 🔥
Usually Git is very good at detecting and ignoring duplicate commits. However in this case those inarduino
appear different from the newmain
, since no binaries are ever mentioned in the latter. So, Git probably tried to apply some from the old ones from thearduino
branch over the tip ofmain
, creating LOTS of conflicts.
All automatic operations like those(*) will certainly fail, and will create mangled history should they complete somehow.
↩️Abort the current operation. This is usually done adding--abort
to the command you tried. If all else fails, try agit reset --hard
to your original branch name.
(*) The only somewhat safe operation is aninteractive rebase where you manually edit and remove all duplicate commits that Git would wrongly apply.