Android代码越滚越大,每升级一次系统,git代码数据库都会加大。
磁盘空间告急,考虑使用以下命令代替repo sync和git pull更新代码
浅下载
repo init --depth=1 -u XXXXXXXXX
只下载当前分支的内容
repo sync -c --no-tags
更新代码
git pull --no-tags origin $BRANCH_NAME
git命令参数太多,不想敲这么长可以使用alias简化代替
git config --global alias.pl ‘pull --no-tags origin’
运行一次之后全局修改git pl 代替 git pull --no-tags origin
之后使用git pl BRANDCH_NAME 代替 git pull --no-tags origin $BRANCH_NAME