repo-源代码同步

【1】Amlogic 源代码同步(repo) 
    1、在241服务器 /home/bingli/目录下生成id_rsa.pub、id_rsa 用来同步代码用,生成方法如下: 
    bingli@ubuntu:~$ ssh-keygen -t rsa 
    Generating public/private rsa key pair. 
    Enter file in which to save the key (/home/bingli/.ssh/id_rsa): id_rsa 
    Enter passphrase (empty for no passphrase): 没有密码,直接enter 
    Enter same passphrase again: 
    Your identification has been saved in id_rsa. 
    Your public key has been saved in id_rsa.pub. 
    The key fingerprint is: 
    dc:da:eb:f3:e8:2b:8b:2c:5b:fd:73:5c:6a:db:4e:41 

    2、cp repo bin/ 有一个写好的repo脚本复制到bin目录下面 
    3、chmod a+x repo 修改可执行权限 
    4、export PATH=~/bin:$PATH 
    5、mkdir Amlogic 
    6、repo init -u ssh://git@openlinux.amlogic.com/kitkat/platform/manifest.git -b kk-amlogic -- repo- url=ssh://git@openlinux.amlogic.com/repo.git 
    7、repo sync 
    8、repo init -m openlinux_kk-amlogic_20140823.xml 
    9、repo sync 
    10、编译: 
    . ./build/envsetup.sh 
    lunch 

【2】 RK3126  repo仓库
    git clone ssh://git@192.168.1.249/repo/rk/tools/repo
    ./repo/repo init -u ssh://git@192.168.1.249/repo/rk/platform/manifest -b android-5.1 -m rk312x_android5.1_release.xml
    .repo/repo/repo sync
    
【3】RK3188 repo仓库
    git clone ssh://git@192.168.1.249/repo/rk/tools/repo
    ./repo/repo init -u ssh://git@192.168.1.249/repo/rk/platform/manifest -b android-5.1 -m rk3188_android-5.1_v1.00/rk3188_android-5.1_v1.05_20151214.xml    
    .repo/repo/repo sync    
    
    或者
    git clone ssh://git@192.168.1.249/repo/rk/tools/repo
    ./repo/repo init -u ssh://git@192.168.1.249/repo/rk/platform/manifest -b android-5.1 -m rk3188_lollipop_release.xml
    .repo/repo/repo sync
    
【4】当替换了.ssh文件夹下面的id_rsa id_rsa.pub config known_hosts后一定要注意属性
     lb@ubuntu:~/.ssh$ ll
     total 24
     drwx------ 2 lb lb 4096 Dec 10 18:26 ./
     drwxr-xr-x 7 lb lb 4096 Dec 10 18:32 ../
     -rw-r--r-- 1 lb lb 1668 Dec 10 18:26 config
     -rw------- 1 lb lb 1679 Dec 10 18:26 id_rsa
     -rw-r--r-- 1 lb lb  406 Dec 10 18:26 id_rsa.pub
     -rw-r--r-- 1 lb lb 1110 Dec 10 18:26 known_hosts
     
    chmod 600 id_rsa
    chmod 644 config id_rsa.pub known_hosts


【5】查看repo分支:./repo/repo forall -c git branch -a  
     例如:
    代码分支:
    ./repo/repo forall -c 'git fetch --all'
    ./repo/repo forall -c 'git checkout -b prj-3188-dev $REPO_REMOTE/prj-3188-dev'

【6】repo start mybranch --all  创建分支

【7】
      把所有的库切换分支:  repo forall  -c 'git checkout branch_name'
    删除所有库的某个分支: repo forall  -c 'git branch -D branch_name' 或者
    删除不用的本地分支:“repo abandon 分支名” 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值