Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ngroman opened this issue Sep 21, 2016 · 4 comments
Open

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

ngroman opened this issue Sep 21, 2016 · 4 comments

Comments

@ngroman
Copy link

ngroman commented Sep 21, 2016

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
Copy link

umiphos commented May 8, 2018

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

My bad refs was
+refs/heads/git@github.com:/.git:refs/remotes//git@github.com:/.git

@SinghUKKingh
Copy link

My Commit

@Dev00114
Copy link

always have seen this error! have no resolve way

@TOSEEB
Copy link

TOSEEB commented Feb 21, 2023

i am having same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants