GIT brach
$ git branch -h
用法:git branch [选项] [-r | -a] [--merged | --no-merged]或:git branch [选项] [-l] [-f] <分支名> [<起始点>]
或:git branch [选项] [-r] (-d | -D) <分支名>...
或:git branch [选项] (-m | -M) [<旧分支>] <新分支>
通用选项
-v, --verbose 显示哈希值和主题,若参数出现两次则显示上游分支
-q, --quiet 不显示信息
-t, --track 设置跟踪模式(参见 git-pull(1))
--set-upstream 改变上游信息
-u, --set-upstream-to <upstream>
change the upstream info
--unset-upstream Unset the upstream info
--color[=<何时>] 使用彩色输出
-r, --remotes 作用于远程跟踪分支
--contains <提交> 只打印包含该提交的分支
--abbrev[=<n>] 用 <n> 位数字显示 SHA-1 哈希值
具体的 git-branch 动作:
-a, --all 列出远程跟踪及本地分支
-d, --delete 删除完全合并的分支
-D 删除分支(即使没有合并)
-m, --move 移动/重命名一个分支,以及它的引用日志
-M 移动/重命名一个分支,即使目标已存在
--list 列出分支名
-l, --create-reflog 创建分支的引用日志
--edit-description 标记分支的描述
-f, --force 强制创建(当已经存在)
--no-merged <提交> 只打印没有合并的分支
--merged <提交> 只打印合并的分支
--column[=<风格>] 以列的方式显示分支
GIT fetch
$ git fetch -h
用法:git fetch [<选项>] [<版本库> [<引用规则>...]]
或:git fetch [<选项>] <组>
或:git fetch --multiple [<选项>] [(<版本库> | <组>)...]
或:git fetch --all [<选项>]
-v, --verbose 更加详细
-q, --quiet 更加安静
--all 从所有的远程抓取
-a, --append 追加到 .git/FETCH_HEAD 而不是覆盖它
--upload-pack <路径> 上传包到远程的路径
-f, --force 强制覆盖本地分支
-m, --multiple 从多个远程抓取
-t, --tags 抓取所有的 tags 和关联对象
-n 不抓取任何 tags (--no-tags)
-p, --prune 清除远程已经不存在的分支的跟踪分支
--recurse-submodules[=<on-demand>]
控制子模组的递归抓取
--dry-run 演习
-k, --keep 保持下载包
-u, --update-head-ok 允许更新 HEAD 引用
--progress 强制显示进度报告
--depth <深度> 深化浅克隆的历史
--unshallow 转换为一个完整的版本库
--update-shallow 接受更新 .git/shallow 的引用
GIT remote
$ git remote -h
用法:git remote [-v | --verbose]
或:git remote add [-t <分支>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <名称> <url>
或:git remote rename <旧名称> <新名称>
或:git remote remove <名称>
或:git remote set-head <名称> (-a | --auto | -d | --delete |<分支>)
或:git remote [-v | --verbose] show [-n] <名称>
或:git remote prune [-n | --dry-run] <名称>
或:git remote [-v | --verbose] update [-p | --prune] [(<组> | <远程>)...]
或:git remote set-branches [--add] <名称> <分支>...
或:git remote set-url [--push] <名称> <新的地址> [<旧的地址>]
或:git remote set-url --add <名称> <新的地址>
或:git remote set-url --delete <名称> <地址>
-v, --verbose 冗长输出;必须置于子命令之前