-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport the upstream fix (was 98aed4e ).
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,11 +61,11 @@ From [email protected]:schacon/simplegit | |
* [new branch] topic -> origin/topic | ||
---- | ||
|
||
在这个例子中,对 master 分支的拉取操作被拒绝,因为它不是一个可以快进的引用。 | ||
在这个例子中,对 `master` 分支的拉取操作被拒绝,因为它不是一个可以快进的引用。 | ||
我们可以通过在引用规格之前指定 `+` 号来覆盖该规则。 | ||
|
||
你也可以在配置文件中指定多个用于获取操作的引用规格。 | ||
如果想在每次获取时都包括 master 和 experiment 分支,添加如下两行: | ||
如果想在每次获取时都包括 `master` 和 `experiment` 分支,添加如下两行: | ||
|
||
[source,ini] | ||
---- | ||
|
@@ -83,7 +83,7 @@ fetch = +refs/heads/qa*:refs/remotes/origin/qa* | |
---- | ||
|
||
但我们可以使用命名空间(或目录)来达到类似目的。 | ||
假设你有一个 QA 团队,他们推送了一系列分支,同时你只想要获取 master 和 QA 团队的所有分支而不关心其他任何分支,那么可以使用如下配置: | ||
假设你有一个 QA 团队,他们推送了一系列分支,同时你只想要获取 `master` 和 QA 团队的所有分支而不关心其他任何分支,那么可以使用如下配置: | ||
|
||
[source,ini] | ||
---- | ||
|
@@ -129,4 +129,4 @@ $ git push origin master:refs/heads/qa/master | |
$ git push origin :topic | ||
---- | ||
|
||
因为引用规格(的格式)是 `<src>:<dst>`,所以上述命令把 `<src>` 留空,意味着把远程版本库的 topic 分支定义为空值,也就是删除它。 | ||
因为引用规格(的格式)是 `<src>:<dst>`,所以上述命令把 `<src>` 留空,意味着把远程版本库的 `topic` 分支定义为空值,也就是删除它。 |