1. 如何檢視本地Android代碼的分支資訊,以及檢視更多的分支
git --git-dir=.repo/manifests/.git/ branch -av
remotes/m/lineage-15.1 -> origin/lineage-15.1
remotes/origin/lineage-15.1 5f30c52 Track our own fork(s) for 2021-07 ASB patching
remotes/origin/lineage-16.0 ba8713c Track our own fork(s) for 2021-08 ASB patching
remotes/origin/lineage-17.1 ae706e7 Track our own fork(s) for 2021-08 ASB patching
2. 切換分支版本
repo init -b gingerbread-release
3.如果本地版本庫中的源代碼有一些改動,執行repo sync指令後,會出現錯誤,執行重置
repo forall -c git reset --hard remotes/origin/xxxxxxx
repo forall -c git xxxxxxx
repo sync