sublime-github icon indicating copy to clipboard operation
sublime-github copied to clipboard

'fatal: Invalid refspec' error when using glob refspecs

Open ngroman opened this issue 9 years ago • 4 comments

I work in a repo with hundreds of very active contributors and thousands of branches. In order to speed up fetches, I have my .git/config only fetch master branches and those that match start with my username

.git/config:

...
[remote "origin"]
        url = [email protected]:XXX/XXX.git
        fetch = +refs/heads/master:refs/remotes/origin/master
        fetch = +refs/heads/nroman-*:refs/remotes/origin/nroman-*
...

Running the command GitHub: View (master) errors out with error: fatal: Invalid refspec '+refs/heads/nroman-*:refs/remotes/origin/nroman-*'

plugin version 1.2.2

ngroman avatar Sep 21 '16 17:09 ngroman

Your issue make me realize that I needed to check the .git/config, in my case that file got a fetch with bad refs

It should be +refs/remotes/<USER>/[email protected]:<USER>/<REPOSITORY>.git

My bad refs was +refs/heads/[email protected]:<USER>/<REPOSITORY>.git:refs/remotes/<USER>/[email protected]:<USER>/<REPOSITORY>.git

umiphos avatar May 08 '18 22:05 umiphos

My Commit

SinghUKKingh avatar Apr 28 '19 19:04 SinghUKKingh

always have seen this error! have no resolve way

Dev00114 avatar Aug 26 '20 06:08 Dev00114

i am having same error

TOSEEB avatar Feb 21 '23 14:02 TOSEEB