From: Markus Trippelsdorf <hidden> Date: 2016-06-15 22:59:44
I would like to ignore branches that match a certain pattern, e.g.:
markus@x4 gcc % git branch -a
gcc-4.8
* master
remotes/origin/HEAD -> origin/master
remotes/origin/aldyh/cilk-in-gomp
...
remotes/origin/hjl/arch
remotes/origin/hjl/asan
...
remotes/origin/hjl/x86/m16
remotes/origin/ifunc
remotes/origin/jason/4.6-cxx0x
remotes/origin/jason/alias-decl
remotes/origin/jason/comdat-debug
remotes/origin/lw-ipo
remotes/origin/master
...
Is it possible to ignore all branches that match "hjl"?
--
Markus
From: Jim Garrison <hidden> Date: 2016-06-15 22:59:44
-----Original Message-----
Behalf Of Markus Trippelsdorf
Sent: Friday, January 24, 2014 1:01 AM
Subject: Globbing for ignored branches?
I would like to ignore branches that match a certain pattern, e.g.:
[snip]
Is it possible to ignore all branches that match "hjl"?
If you mean ignore them when you do "git branch -a", then
git branch -a |grep -v hjl
If you mean "ignore" in some other scenario you need to be more specific about what you want.
From: Markus Trippelsdorf <hidden> Date: 2016-06-15 22:59:44
On 2014.01.24 at 16:37 +0000, Jim Garrison wrote:
quoted
-----Original Message-----
Behalf Of Markus Trippelsdorf
Sent: Friday, January 24, 2014 1:01 AM
Subject: Globbing for ignored branches?
I would like to ignore branches that match a certain pattern, e.g.:
[snip]
quoted
Is it possible to ignore all branches that match "hjl"?
If you mean ignore them when you do "git branch -a", then
git branch -a |grep -v hjl
If you mean "ignore" in some other scenario you need to be more
specific about what you want.
From: Markus Trippelsdorf <hidden> Date: 2016-06-15 22:59:44
On 2014.01.24 at 18:07 +0100, Markus Trippelsdorf wrote:
On 2014.01.24 at 16:37 +0000, Jim Garrison wrote:
quoted
quoted
-----Original Message-----
Behalf Of Markus Trippelsdorf
Sent: Friday, January 24, 2014 1:01 AM
Subject: Globbing for ignored branches?
I would like to ignore branches that match a certain pattern, e.g.:
[snip]
quoted
Is it possible to ignore all branches that match "hjl"?
If you mean ignore them when you do "git branch -a", then
git branch -a |grep -v hjl
If you mean "ignore" in some other scenario you need to be more
specific about what you want.
From: Jeff King <hidden> Date: 2016-06-15 22:59:44
On Fri, Jan 24, 2014 at 06:09:09PM +0100, Markus Trippelsdorf wrote:
quoted
quoted
If you mean "ignore" in some other scenario you need to be more
specific about what you want.
I want to them when I run "git pull".
ignore
I assume you mean that you do not want to fetch them at all, not that
you want to avoid merging them. The set of branches that git fetches is
configured by the fetch "refspec" in your config file. It usually looks
like this:
$ git config remote.origin.fetch
+refs/heads/*:refs/remotes/origin/*
But you can specify a specific list of branches you want to fetch
instead:
$ git config --unset remote.origin.fetch
$ for i in master other-branch; do
git config --add remote.origin.fetch \
+refs/heads/$i:refs/remotes/origin/$i
done
However, you do have to specify each branch individually. You probably
want to say "all branches except X", and you cannot currently specify
a negative refspec like that.
-Peff
From: Markus Trippelsdorf <hidden> Date: 2016-06-15 22:59:44
On 2014.01.24 at 13:23 -0500, Jeff King wrote:
On Fri, Jan 24, 2014 at 06:09:09PM +0100, Markus Trippelsdorf wrote:
quoted
quoted
quoted
If you mean "ignore" in some other scenario you need to be more
specific about what you want.
I want to them when I run "git pull".
ignore
I assume you mean that you do not want to fetch them at all, not that
you want to avoid merging them. The set of branches that git fetches is
configured by the fetch "refspec" in your config file. It usually looks
like this:
$ git config remote.origin.fetch
+refs/heads/*:refs/remotes/origin/*
But you can specify a specific list of branches you want to fetch
instead:
$ git config --unset remote.origin.fetch
$ for i in master other-branch; do
git config --add remote.origin.fetch \
+refs/heads/$i:refs/remotes/origin/$i
done
However, you do have to specify each branch individually. You probably
want to say "all branches except X", and you cannot currently specify
a negative refspec like that.
Thanks.
Yes, that was the question I wanted to ask (, sorry for not formulating
it more clearly).
Is this "negative refspec for branches" a feature that is planned for
the future?
--
Markus
From: Jeff King <hidden> Date: 2016-06-15 22:59:44
On Fri, Jan 24, 2014 at 07:32:22PM +0100, Markus Trippelsdorf wrote:
quoted
However, you do have to specify each branch individually. You probably
want to say "all branches except X", and you cannot currently specify
a negative refspec like that.
Yes, that was the question I wanted to ask (, sorry for not formulating
it more clearly).
Is this "negative refspec for branches" a feature that is planned for
the future?
It is something that has been talked about before, but I do not think
anybody is actively working on. It would probably not be too hard a
feature if you are interested in getting your feet wet in git
development. :)
-Peff