Repo
Repo complements Git by simplifying work across multiple repositories.
From https://source.android.com/docs/setup/create/repo
基本语法
repo
content | command |
---|---|
Help | Repo help |
Command Help | Repo < command> --help |
init | Repo init -u url [options] |
sync | Repo sync < project-list> |
upload | Repo upload < project-list> |
Check diff | Repo diff |
download | Repo download |
forall | Repo forall < project-list> -c command |
check all repos status | repo status |
sync
- If the project has never been synchronized, then repo sync is equivalent to git clone. All branches in the remote repository are copied to the local project directory.
- If the project has been synchronized before, then repo sync is equivalent to:
git remote update
git rebase origin/branch
Git
显示单次commit的改动内容
git show commit-id
patch相关
- 生成patch
git format-patch HEAD^ - 应用patch
git am file - 打patch,但是不保留commit信息
git apply file
git log特定搜索
- 搜索特定的作者
git log --author name - 搜索特定的title
git log --grep title
*只查看和某个文件相关的git log
git log filename