NotePublic/Software/Applications/Repo/Repo_使用.md

57 lines
839 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Repo 使用
```bash
vim /usr/bin/repo
```
将 REPO_URL 修改为 '<https://mirrors.tuna.tsinghua.edu.cn/git/git-repo>'。
## 创建并切换分支
```bash
repo start <新分支名> --all
```
## 查看分支
```bash
repo branches
```
## 切换分支
```bash
repo checkout <远程分支名>
```
## 提交代码
```bash
git commit -asm <Commit信息>
```
## Push 代码
```bash
git push <远程主机名> <本地分支名>:refs/for/<远程分支名>
git push <远程主机名> <本地分支名>:refs/drafts/<远程分支名>
```
## Gerrit 服务器 Android 使用
ACRN
```bash
repo init -u ssh://cheny@10.20.0.34:29418/manifests -b oa/gordon_peak_acrn/a90/rel -m manifest-AAH.xml
repo sync -j<线程数>
```
Nitc:
```bash
repo init -u ssh://chensf@10.20.3.17:29418/manifests -b nitc
repo sync -j<线程数>
```