add new chinese translations

This commit is contained in:
2024-12-30 15:25:56 +08:00
parent a850046d7b
commit 0d798759fd
5418 changed files with 105800 additions and 7052 deletions

View File

@@ -1,37 +1,37 @@
# git rebase
> commits 从一个分支合并到另一个分支上。
> 常用于跨分支的 commits 合并,在被合并分支的最头部构建新的 `commit`,表示合并完成
> 更多信息:<https://git-scm.com/docs/git-rebase>.
> 一个分支的提交重新应用到另一个分支上。
> 常用于“移动”整个分支到另一个基础上,在新位置创建提交的副本
> 更多信息:<https://git-scm.com/docs/git-rebase>
- 在另一个分支的头节点合并当前分支:
- 将当前分支重新基于另一个指定的分支:
`git rebase {{目标分支}}`
`git rebase {{new_base_branch}}`
- 启动交互式的合并任务,允许对提交的内容进行重新排序、略、合并或修改:
- 启动一个交互式变基,允许重新排序、略、合并或修改提交
`git rebase {{-i|--interactive}} {{目标分支或 commithash}}`
`git rebase {{-i|--interactive}} {{target_base_branch_or_commit_hash}}`
- 处理完冲突文件后,继续执行合并任务
- 继续一个因合并失败而中断的变基,在编辑冲突文件后
`git rebase --continue`
- 跳过冲突文件,继续执行合并任务
- 继续一个因合并冲突而暂停的变基,通过跳过冲突的提交
`git rebase --skip`
- 终止正在执行中的合并任务(例如:对于正处于解决冲突中的任务,将其打断,恢复到合并前的状态
- 中止一个正在进行的变基(例如,如果它因合并冲突而中断
`git rebase --abort`
- 将分支的部分 commits 生成新的 `commit`,移动到新分支的头节点:
-当前分支的部分移动到一个新的基础上,提供旧的基础作为起点:
`git rebase --onto {{目标分支}} {{当前分支}}`
`git rebase --onto {{new_base}} {{old_base}}`
- 启动交互式的合并任务,对最近提交的 5 个 commits 进行重新排序、略、合并或修改:
- 在原地重新应用最后 5 个提交,暂停以允许它们被重新排序、略、合并或修改:
`git rebase {{-i|--interactive}} {{HEAD~5}}`
- 以当前分支优先的策略,自动处理分支间的冲突,执行合并
- 通过优先使用工作分支版本自动解决任何冲突(在这种情况下,`theirs` 关键字的含义是相反的)
`git rebase {{-X|--strategy-option}} theirs {{分支名称}}`
`git rebase {{-X|--strategy-option}} theirs {{branch_name}}`