@@ -7,3 +7,40 @@ The official Arduino cores can now be found here:
7
7
- https://github.com/arduino/ArduinoCore-avr
8
8
- https://github.com/arduino/ArduinoCore-sam
9
9
- https://github.com/arduino/ArduinoCore-samd
10
+
11
+ ##### Migrating commits
12
+ If you need to move commits and/or pull requests over from this
13
+ repository into the separate core repositories, an approach to handle
14
+ that mostly automatically is suggested below. These are for the avr
15
+ core, but with some changes, it should apply to sam as well.
16
+
17
+ # Start out in the Arduino repo, by rebasing your branch on top of the
18
+ # last commit that still contained the avr core. This makes sure that
19
+ # any conflicts are resolved before transferring the commits, since git
20
+ # am is not so helpful with conflicts.
21
+ git checkout my-branch
22
+ git rebase -i 950d88dcbe7b9b2d348fb25b5ffcd0c6d2d30b97
23
+
24
+ # Then, generate patch files for all of your commits, into the patches
25
+ # directory.
26
+ git format-patch -o patches 950d88dcbe7b9b2d348fb25b5ffcd0c6d2d30b97
27
+
28
+ # These steps are optional, but if your commits contain changes to other
29
+ # files than the avr core, this re-applies your commits with only the
30
+ # avr core changes, and regenerates the patches
31
+ git checkout -b tmp-branch 950d88dcbe7b9b2d348fb25b5ffcd0c6d2d30b97
32
+ git am --include 'hardware/arduino/avr/*' patches/*
33
+ rm -rf patches/
34
+ git format-patch -o patches 950d88dcbe7b9b2d348fb25b5ffcd0c6d2d30b97
35
+
36
+ # Then, in the ArduinoCore-avr repo, create a new branch on the commit
37
+ # matching the Arduino repo.
38
+ git checkout -b my-branch b7c607663fecc232e598f2c0acf419ceb0b7078c
39
+
40
+ # Apply our previously generated patches (update the path to point to
41
+ # wherever you generated the patches previously). -p4 tells git am to
42
+ # strip the a/hardware/arduino/avr part of the paths before applying.
43
+ git am -p4 /path/to/patches/*
44
+
45
+ # Finally, rebase on top of master
46
+ git rebase origin/master
0 commit comments