repo 的官方文档

repo 工具安装和使用教程(windows+gitee) 官方的定义:Repo是谷歌用python脚本写的调用git的一个脚本,可以实现管理多个git库。Android的源代码使用Repo 命令行工具来管理多个git仓库,大概有百多个。要想克隆和管理百多个 Git 仓库,不是一件简单的事情。Repo 命令行工具对 Git 部分命令如clone、pull,push,分支切换等众多命令和操作动作进行封装,将百多个 Git 库有效的进行组织。 阅读详情

repo 的官方文档 http://source.android.com/source/version-control.html


Version Control with Repo and Git

To work with the Android code, you will need to use both Git and Repo. In most situations, you can use Git instead of Repo, or mix Repo and Git commands to form complex commands. Using Repo for basic across-network operations will make your work much simpler, however.

Git is an open-source version-control system designed to handle very large projects that are distributed over multiple repositories. In the context of Android, we use Git for local operations such as local branching, commits, diffs, and edits. One of the challenges in setting up the Android project was figuring out how to best support the outside community--from the hobbiest community to large OEMs building mass-market consumer devices. We wanted components to be replaceable, and we wanted interesting components to be able to grow a life of their own outside of Android. We first chose a distributed revision control system, then further narrowed it down to Git.

Repo is a repository management tool that we built on top of Git. Repo unifies the many Git repositories when necessary, does the uploads to our revision control system, and automates parts of the Android development workflow. Repo is not meant to replace Git, only to make it easier to work with Git in the context of Android. The repo command is an executable Python script that you can put anywhere in your path. In working with the Android source files, you will use Repo for across-network operations. For example, with a single Repo command you can download files from multiple repositories into your local working directory.

Gerrit is a web-based code review system for projects that use git. Gerrit encourages more centralized use of Git by allowing all authorized users to submit changes, which are automatically merged if they pass code review. In addition, Gerrit makes reviewing easier by displaying changes side by side in-browser and enabling inline comments.

Basic Workflow

basic workflow diagram

The basic pattern of interacting with the repositories is as follows:

  1. Use repo start to start a new topic branch.

  2. Edit the files.

  3. Use git add to stage changes.

  4. Use git commit to commit changes.

  5. Use repo upload to upload changes to the review server.

Task reference

The task list below shows a summary of how to do common Repo and Git tasks. For complete quick-start information and examples, see Getting started.

Synchronizing your client

To synchronize the files for all available projects:

$ repo sync

To synchronize the files for selected projects:

$ repo sync PROJECT0 PROJECT1 PROJECT2 ...

Creating topic branches

Start a topic branch in your local work environment whenever you begin a change, for example when you begin work on a bug or new feature. A topic branch is not a copy of the original files; it is a pointer to a particular commit. This makes creating local branches and switching among them a light-weight operation. By using branches, you can isolate one aspect of your work from the others. For an interesting article about using topic branches, see Separating topic branches. 

To start a topic branch using Repo:

$ repo start BRANCH_NAME

To verify that your new branch was created:

$ repo status

Using topic branches

To assign the branch to a particular project:

$ repo start BRANCH_NAME PROJECT

To switch to another branch that you have created in your local work environment:

$ git checkout BRANCH_NAME

To see a list of existing branches:

$ git branch

or

$ repo branches

The name of the current branch will be preceded by an asterisk.

Note: A bug might be causing repo sync to reset the local topic branch. If git branch shows * (no branch) after you run repo sync, then run git checkout again.

Staging files

By default, Git notices but does not track the changes you make in a project. In order to tell git to preserve your changes, you must mark them for inclusion in a commit. This is also called "staging".

You can stage your changes by running

git add

which accepts as arguments any files or directories within the project directory. Despite the name, git add does not simply add files to the git repository; it can also be used to stage file modifications and deletions.

Viewing client status

To list the state of your files:

$ repo status

To see uncommitted edits:

$ repo diff

The repo diff command shows every local edit that you have made that would not go into the commit, if you were to commit right now. To see every edit that would go into the commit if you were to commit right now, you need a Git command, git diff. Before running it, be sure you are in the project directory:

$ cd ~/WORKING_DIRECTORY/PROJECT  
$ git diff --cached

Committing changes

A commit is the basic unit of revision control in git, consisting of a snapshot of directory structure and file contents for the entire project. Creating a commit in git is as simple as typing

git commit

You will be prompted for a commit message in your favorite editor; please provide a helpful message for any changes you submit to the AOSP. If you do not add a log message, the commit will be aborted.

Uploading changes to Gerrit

Before uploading, update to the latest revisions:

repo sync

Next run

repo upload

This will list the changes you have committed and prompt you to select which branches to upload to the review server. If there is only one branch, you will see a simple y/n prompt.

Recovering sync conflicts

If a repo sync shows sync conflicts:

  • View the files that are unmerged (status code = U).
  • Edit the conflict regions as necessary.
  • Change into the relevant project directory, run git add and git commit for the files in question, and then "rebase" the changes. For example:

    $ git add .
    $ git commit 
    $ git rebase --continue
    
  • When the rebase is complete start the entire sync again:

    $ repo sync PROJECT0 PROJECT1 ... PROJECTN
    

Cleaning up your client files

To update your local working directory after changes are merged in Gerrit:

$ repo sync

To safely remove stale topic branches:

$ repo prune

Deleting a client

Because all state information is stored in your client, you only need to delete the directory from your filesystem:

$ rm -rf WORKING_DIRECTORY

Deleting a client will permanently delete any changes you have not yet uploaded for review.

Git and Repo cheatsheet

list of basic git and repo commands
Anacond下载安装配置教程详解 名,含义是创建python3.7版本,名称为py37的环境。这里环境名和python版本可以自己指定。默认Python版本是3.8:输入python --version显示默认python版本。安装后会在envs目录中生成 py37的 Python=3.7的环境。点击后,如果能在命令行左侧的括号中看到base,则代表安装成功!行,也就是Anaconda Prompt(anaconda3)激活环境(任意目录的cmd窗口均可)文件夹中,进入cmd窗口执行。删除文件envs下的文件包。 阅读详情

相关推荐

白话详细解读(七)----- CBAM:Convolutional Block Attention Module

一、CBAM简介 论文链接:https://x.sci-hub.org.cn/scholar?hl=zh-TW&as_sdt=0%2C5&q=CBAM%3A+Convolutional+Block+Attention+Module&btnG=&oq=CB CBAM这篇论文是在2018年提出的,自提出之后,已经被引用上千次,可见其影响力。CBAM是一种专门为了卷积神经网络而设计的注意力模块,传统的卷积存在只关注局部信息,而往往忽略全局信息的弊端,以3*3卷积为例,滤波器有9个

奋斗の博客 1万+

openEuler 知:repo

repo(repository)是指仓库的意思,读者可能在使用svn时听说过repo,也有可能在使用fedora等通过rpm包方式管理软件的操作系统上听说过repo源。openEuler操作系统也是采用rpm包方式管理软件的操作系统,所以此处的repo主要是指repo源。......

canpool 3455

使用 AFL++ 对 IoT 二进制文件进行模糊测试 - 第一部分

American fuzzy lop 是一款面向安全的模糊测试器,它采用一种新型的编译时插桩和遗传算法,可以自动发现干净、有趣的测试用例,从而触发目标二进制文件中新的内部状态。这显著提高了模糊测试代码的功能覆盖率。AFL 的地址是它已经有一段时间没有更新了。虽然 AFL 仍然运行良好,但有一个新项目 AFL++,它是 AFL 的一个分支,包含许多改进和新功能。AFL++ 的地址是,其源代码位于。在本文中,我们将研究如何使用 AFL++ 对 IoT 二进制文件进行模糊测试。

技术超强的网络安全平台 1092

repo资料

下载链接:curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo

liweigao01的专栏 240

瑞芯微RK3588系统重装实战:从Windows到Linux的完整烧录指南

本文提供了一份详尽的瑞芯微RK3588开发板系统重装实战指南,涵盖从Windows到Linux双平台的完整烧录流程。针对RK3588芯片特性,详细解析了驱动安装、工具使用、固件烧录步骤及常见问题排错,旨在帮助开发者高效、安全地完成系统切换与部署,快速投入AI推理与边缘计算等应用开发。

weixin_29164185的博客 363

AMDGPU驱动中Doorbell与Event机制简要对比

摘要:AMDGpu驱动中,Doorbell和Event是两种异步通知机制。Doorbell是CPU→GPU的单向硬件通知,通过写MMIO寄存器触发GPU拉取任务,延迟低且无需内核介入,适用于队列任务提交。Event是GPU→CPU的双向同步通知,基于中断和内核事件对象,支持阻塞等待,用于任务完成或异常上报。核心区别在于方向、用途和实现方式:Doorbell侧重任务触发,Event侧重状态反馈。两者配合实现高效的任务下发与完成通知流程。

图形/计算GPU的驱动与虚拟化技术分享园地 1864

linux的repo下载地址,repo下载国内链接android源码

刚好碰到要下载一个指定版本的Android源码,在网上没有找到,所以只能自己去下载,看了谷歌官方下载帮助(https://source.android.com/source/downloading.html)但是苦于难访问,下载速度也奇慢,所以找了几个国内的源头下载,那么跟着我动起来,在这之前你需要一台装有linux的电脑或者是虚拟机上装有linux也是可以的.(一).科普一下git与repo的区...

weixin_39982452的博客 2866

零基础学习CANoe Panel(5)——改变变量的值,控件图像也改变,这是怎么回事?

Panel 中控件的图像随着值变化,是怎么回事?

蚂蚁小兵 2146

Repo命令指南(翻译自官方文档)

repo命令的用法: $repo COMMAND OPTIONS 可选参数用方括号("[]")括起来,可以使用下面指令获取每个repo命令的帮助信息: $repo help COMMAND 许多命令使用工程列表作为参数,可以使用工程名或者工程所在的本地目录名: $rep

lz_0618的专栏 9069

华为OD机考双机位C卷 - 信道分配(Java & Python& JS & C/C++ & GO )

华为OD机考双机位C卷 - 信道分配

算法大师! 455

Oracle DG库手动注册归档日志的两种方法

有的时候由于网络或各种原因,Oracle DG库服务器上可能缺少部分归档日志文件,导致DG库的MRP进程一直处于状态。此时我们可以手动从主库或其他DG拷贝归档日志到当前DG服务器,并对日志文件进行手动注册。

Sebastien23的博客 731

Git使用笔记(四)Using Repo and Git

https://sites.google.com/a/android.com/opensource/download/using-repo This article is the official document from Google Android. I should learn something from it. So mark it first. :)

行吟阁 1152

SIMATIC WINCC V8.0安装教程(Win11系统)

SIMATIC WINCC V8.0安装教程(Win11系统)

Robot_PLC_HMI_Automation 9064

深层次的讲解repo原理

https://blog.youkuaiyun.com/stoic163/article/details/78790349 软件工程由于需要不断迭代开发,因此要对源代码进行版本管理。Android源代码工程(AOSP)也不例外,它采用Git来进行版本管理。AOSP作为一个大型开放源代码工程,由许许多多子项目组成,因此不能简单地用Git进行管理,它在Git的基础上建立了一套自己的代码仓库,并且使用工具Repo...

Linux Android Web 2779

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

git repo工具详细使用教程

改成 curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo ,这样就可以下载repo了。在执行的curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo的时候不能下载repo;近一直想下载android的源码看看,但是按照官方的文档下载,遇到了问题。使用下面这个国内资源就可以了。

qq_45698138的博客 335

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

centos如果有的repo失效,每次安装或者更新都会报错

centos如果有的repo失效,每次安装或者更新都会报错 如有下面的错误 http://files.freeswitch.org/yum-1.6/7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-e

安安爸Chris的专栏 3001

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

使用repo下载google源码,跟编译 ,遇到的错误解决

最近一直想下载android的源码看看,但是按照官方的文档下载,遇到了问题。                在执行的curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo的时候不能下载repo;在网上查了大量资料,找到了可行的办法,将    curl http://commondatast

liuwei的专栏 1550

Failed to download metadata for repo ‘docker-ce-stable‘: Cannot download repomd.xml: Cannot download

服务器安装docker报错,TMD烦死,百度都百度不到,给后来人百度到的机会吧。 Failed to download metadata for repo ‘docker-ce-stable’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried cd /etc/yum.repos.d/ rm -rf docker-ce.repo 干掉这该死的repo就好了!!! ...

Java后端 7260

git学习网址

http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013743256916071d599b3aed534aaab22a0db6c4e07fd0000 http://git-scm.com/documentation

QinQin_92的专栏 423

ELKstack-kibana yum安装部署方法

yum安装部署kibana开篇开篇闲话,如果是新人在接触ELKstack什么都不懂的情况下,可以先看看各位前人写的关于ELKstack的博客,如何对ELKstack部署安装及使用,但是别人的东西只能作为借鉴,在自己搭建使用一定要以官方文档为准。一定要注意软件版本,这里系统集合类软件,如果各软件版本不一致,会造成不可预估的后果!!!资源列表官方文档: https://www.e...

白开水的博客 865

修改CentOS的yum源为163

备份 /etc/yum.repos.d/CentOS-Base.repo 修改  /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of e

xanxng的专栏 2172

安装mysql8.0

安装repo源 参考mysql官方文档 参考文章 redhat7通过yum安装mysql5.7.17教程:https://www.jb51.net/article/103676.htm mysql repo源:https://repo.mysql.com/ repo文件详解,epel简介:https://blog.youkuaiyun.com/fantaxy025025/article/details/84...

抹泪写bug 189

Spacemit K1 RISC-V SOC 代码编译烧录

本文详细介绍了在Ubuntu系统上为Spacemit K1设备配置开发环境的步骤。首先,根据Ubuntu版本安装必要的依赖包,并确保repo工具的版本不低于2.41。接着,设置SSH Keys以便从gitee平台下载代码。然后,下载Spacemit K1的2.2版本SDK,并获取buildroot依赖。完成环境配置后,进入SDK根目录进行编译,并选择相应的配置。最后,使用fastboot工具进行烧录,详细说明了EMMC烧录的步骤和分区表配置,并简要描述了设备的启动流程。

DSMGUOGUO的博客 1048

遇到显存不足、节点缺失怎么办:MiniMax-H3-DenoMix常见问题故障排查完整清单

MiniMax-H3-DenoMix 是一个 MiniMax H3 参考图生视频(R2V)pruned INT8 扩散模型,仓库附带两套开箱即用的 ComfyUI 工作流。如果你在 ComfyUI 中遇到显存不足(VRAM OOM)、节点缺失、模型文件找不到、版本不兼容或编译报错等问题,可以对照本文的排查清单逐项定位,快速恢复正常出片。 ## 📌 先搞清楚:仓库里有什么? | 文件 | 作用

gitblog_00083的博客 492

Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist:No URLs

针对centos8

qq_44989936的博客 1476
上一篇: 步进电机基本原理
下一篇: HOWTO: where to download repo
YasinLeeX
博客等级 码龄19年 380粉丝 310原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YasinLeeX

再来一杯西湖龙井。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值