Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
077f3d40
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
077f3d40
编写于
11月 15, 2009
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'cb/doc-fetch-pull-merge' into maint
* cb/doc-fetch-pull-merge: modernize fetch/merge/pull examples
上级
04b35775
d504f697
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
66 addition
and
45 deletion
+66
-45
Documentation/git-fetch.txt
Documentation/git-fetch.txt
+29
-0
Documentation/git-merge.txt
Documentation/git-merge.txt
+33
-0
Documentation/git-pull.txt
Documentation/git-pull.txt
+4
-45
未找到文件。
Documentation/git-fetch.txt
浏览文件 @
077f3d40
...
...
@@ -37,6 +37,35 @@ include::pull-fetch-param.txt[]
include::urls-remotes.txt[]
EXAMPLES
--------
* Update the remote-tracking branches:
+
------------------------------------------------
$ git fetch origin
------------------------------------------------
+
The above command copies all branches from the remote refs/heads/
namespace and stores them to the local refs/remotes/origin/ namespace,
unless the branch.<name>.fetch option is used to specify a non-default
refspec.
* Using refspecs explicitly:
+
------------------------------------------------
$ git fetch origin +pu:pu maint:tmp
------------------------------------------------
+
This updates (or creates, as necessary) branches `pu` and `tmp` in
the local repository by fetching from the branches (respectively)
`pu` and `maint` from the remote repository.
+
The `pu` branch will be updated even if it is does not fast-forward,
because it is prefixed with a plus sign; `tmp` will not be.
SEE ALSO
--------
linkgit:git-pull[1]
...
...
Documentation/git-merge.txt
浏览文件 @
077f3d40
...
...
@@ -212,6 +212,39 @@ You can work through the conflict with a number of tools:
common ancestor, 'git show :2:filename' shows the HEAD
version and 'git show :3:filename' shows the remote version.
EXAMPLES
--------
* Merge branches `fixes` and `enhancements` on top of
the current branch, making an octopus merge:
+
------------------------------------------------
$ git merge fixes enhancements
------------------------------------------------
* Merge branch `obsolete` into the current branch, using `ours`
merge strategy:
+
------------------------------------------------
$ git merge -s ours obsolete
------------------------------------------------
* Merge branch `maint` into the current branch, but do not make
a new commit automatically:
+
------------------------------------------------
$ git merge --no-commit maint
------------------------------------------------
+
This can be used when you want to include further changes to the
merge, or want to write your own merge commit message.
+
You should refrain from abusing this option to sneak substantial
changes into a merge commit. Small fixups like bumping
release/version name would be acceptable.
SEE ALSO
--------
linkgit:git-fmt-merge-msg[1], linkgit:git-pull[1],
...
...
Documentation/git-pull.txt
浏览文件 @
077f3d40
...
...
@@ -131,54 +131,13 @@ $ git pull origin next
------------------------------------------------
+
This leaves a copy of `next` temporarily in FETCH_HEAD, but
does not update any remote-tracking branches.
* Bundle local branch `fixes` and `enhancements` on top of
the current branch, making an Octopus merge:
+
------------------------------------------------
$ git pull . fixes enhancements
------------------------------------------------
+
This `git pull .` syntax is equivalent to `git merge`.
* Merge local branch `obsolete` into the current branch, using `ours`
merge strategy:
+
------------------------------------------------
$ git pull -s ours . obsolete
------------------------------------------------
* Merge local branch `maint` into the current branch, but do not make
a commit automatically:
does not update any remote-tracking branches. Using remote-tracking
branches, the same can be done by invoking fetch and merge:
+
------------------------------------------------
$ git pull --no-commit . maint
$ git fetch origin
$ git merge origin/next
------------------------------------------------
+
This can be used when you want to include further changes to the
merge, or want to write your own merge commit message.
+
You should refrain from abusing this option to sneak substantial
changes into a merge commit. Small fixups like bumping
release/version name would be acceptable.
* Command line pull of multiple branches from one repository:
+
------------------------------------------------
$ git checkout master
$ git fetch origin +pu:pu maint:tmp
$ git pull . tmp
------------------------------------------------
+
This updates (or creates, as necessary) branches `pu` and `tmp` in
the local repository by fetching from the branches (respectively)
`pu` and `maint` from the remote repository.
+
The `pu` branch will be updated even if it is does not fast-forward;
the others will not be.
+
The final command then merges the newly fetched `tmp` into master.
If you tried a pull which resulted in a complex conflicts and
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录