# Howto prepare local environment from upstream source (e.g. merge remote repos to subtrees)
# clone main repository and add remotes for subtrees
git clone -o upstream-core https://github.com/platformio/platformio-core.git platformio
cd platformio
git remote add upstream-docs https://github.com/platformio/platformio-docs.git
git remote add upstream-examples https://github.com/platformio/platformio-examples.git
git fetch --all

# checkout latest version and add subtrees of this version (can be found on github/origin project source)
git checkout -b upstream v3.6.4
git subtree add --prefix=d_docs upstream-docs a48c700ba11faa1da891ddeab613192c768252a9
git subtree add --prefix=d_examples upstream-examples 99f177e5be7c595ac99167fd7b302ea117d64b42
git tag upstream/3.6.4

# create debian/master branch from upstream with subtrees
git checkout -b debian/master

# =========================================================
# Howto bump version 

git checkout upstream
git pull upstream-core v3.6.5
git subtree pull -P d_docs upstream-docs <commit/tag>
git subtree pull -P d_examples upstream-examples <commit/tag>
git tag upstream/3.6.5

# merge to debian/master
git checkout debian/master
git merge upstream/3.6.5

