Move old branches to pmaports
There are quite a few old branches in the pmbootstrap repo that belong in the pmaports repo.
This is the workflow that I came up with to move them:
cd pmbootstrap/aports
git remote add pmbootstrap https://gitlab.com/postmarketOS/pmbootstrap.git
git fetch pmbootstrap
- Find a branch in remotes/pmbootstrap that ONLY has changes in the aports directory
git checkout pmbootstrap/<branch>
git checkout -b <branch>
git filter-branch --subdirectory-filter aports/ -f
-
git rebase master
- If the rebase isn't straightforward, just skip it with
git rebase --abort
and continue to the next step
- If the rebase isn't straightforward, just skip it with
- Review branch with
gitk --all
- Rewrite commit messages to replace issue/PR numbers with
pmbootstrap#<issue>
orpmbootstrap!<MR>
? git push origin <branch>
- Delete branch in pmbootstrap repo
Thoughts?
Edited by Grant Miller