Create android source branch (創建安裝源碼分支)

Create Android Source Code Branch

  1. 使用Gerrit管理Android Source Code:
  2. 創建AOSP Branch:
    • export rls_branch_name=”android-xxxxxxxxx”
    • export base_branch=”android-xxxxxxxxxx”
    • repo forall -c “git branch $rls_branch_name”
    • repo forall -c “git checkout $rls_branch_name”
    • repo forall -c “git push aosp HEAD:refs/heads/$rls_branch_name”
    • cd .repo/manifests
    • var_remote_name=$(git remote)
    • git branch $rls_branch_name
    • git checkout $rls_branch_name
    • sed -i ‘s/basebranch/ rls_branch_name/g’ default.xml
    • git commit -a -s -m “${rls_branch_name}: create release branch “
    • git push varremotenameHEAD:refs/heads/ rls_branch_name
  3. 遇到的問題:

    • 沒有push權限:
      • 在All-Project中修改權限。
    • 個別項目出現無法。

      • fatal:  A Contributor Agreement must be completed before uploading:
        http://192.168.11.229/#/settings/agreements
        fatal: Could not read from remote repository.

        服務器git倉庫執行:git branch -v,
        出現: fatal: HEAD not found below refs/heads!

      • 原因是在服務器中的項目下.git/refs/heads/ 下對於的branch不存在。

      • 解決:刪除項目, git clone url –mirror
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章