bgreenlee / sublime-github

Sublime Text 2/3 plugin that provides a number of useful commands for GitHub.
MIT License
455 stars 98 forks source link

'fatal: Invalid refspec' error when using glob refspecs #103

Open ngroman opened 7 years ago

ngroman commented 7 years ago

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 = git@github.com: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

umiphos commented 6 years ago

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>/git@github.com:<USER/.git

My bad refs was +refs/heads/git@github.com:USER>/<REPOSITORY>.git:refs/remotes/<USER>/git@github.com:<USER/.git

SinghUKKingh commented 5 years ago

My Commit

Dev00114 commented 3 years ago

always have seen this error! have no resolve way

TOSEEB commented 1 year ago

i am having same error