I have got used to create patch and bbappend files manually, now I’m switching to use devtool - To be honest it’s quite easy to use.
devtool modify <recipe_name> <dst_path_to_export>
Then we can do changes based on exported source code.
When changes are verified and we need to add changes into bbapned file as a patch, just use git to commit changes, then:
devtool update-recipe <recipe_name> -m patch -a <dst_layer_path_to_generate_bbapned>
devtool reset <recipe_name>
Note: devtool will not delete exported source code.