git下载Ardupilot源码

 

指定分支或者标签下载

git  clone  -b  branch_name/tag_name   https://github.com/Ardupilot/Ardupilot.git

 

下载子模块

cd ardupilot
git submodule update --init --recursive

 

指定分支或者标签并且下载子模块

git  clone  --recursive -b  branch_name/tag_name   https://github.com/Ardupilot/Ardupilot.git

 

列出所有本地和远程分支

git branch -a

 

列出所有标签

git tag

 

例如

​ 下载Ardupilot工程下的分支Copter-3.5.4,git指令如下:

    pwd         #确定当前目录
    mkdir  Copter-3.5.4     #如有需要,新建目录
    cd Copter-3.5.4         #进入新目录文件
    #克隆指定分支,并且克隆分支对应的git子模块
    git clone --recursive -b Copter-3.5.4 https://github.com/ardupilot/ardupilot
    
    #编译源码之前 
    # make clean-清楚项目文件
    # make px4-clean -清楚px4项目有关文件,这个过程会校验工程子模块,如果通过,后续编译基本没有问题
    # make px4-v2   - 编译固件
    
    #   Write by Awesome
posted @ 2018-03-22 16:27  前端人生  阅读(1323)  评论(0编辑  收藏  举报