Skip to content

Commit a552a64

Browse files
authored
Merge pull request #1397 from JanecekPetr/1395-refspec-globbing-available-since-git-2.6.0
(#1395) Partial globbing is available in refspec since git 2.6.0
2 parents 1b66cc4 + 50caafb commit a552a64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/10-git-internals/sections/refspec.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ If you want to always fetch the `master` and `experiment` branches from the `ori
7575
fetch = +refs/heads/experiment:refs/remotes/origin/experiment
7676
----
7777

78-
You can't use partial globs in the pattern, so this would be invalid:
78+
Since Git 2.6.0 you can use partial globs in the pattern to match multiple branches, so this works:
7979

8080
[source,ini]
8181
----
8282
fetch = +refs/heads/qa*:refs/remotes/origin/qa*
8383
----
8484

85-
However, you can use namespaces (or directories) to accomplish something like that.
85+
Even better, you can use namespaces (or directories) to accomplish the same with more structure.
8686
If you have a QA team that pushes a series of branches, and you want to get the `master` branch and any of the QA team's branches but nothing else, you can use a config section like this:
8787

8888
[source,ini]

0 commit comments

Comments
 (0)