Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git remote command returns fatal: Invalid refspec +refs/heads/*:refs/remotes/:origin/*

Tags:

git

github

I accidentally modified my git config file and now hitting git remote --v in the terminal it returns: fatal: Invalid refspec '+refs/heads/*:refs/remotes/:origin/*',

What could be wrong in my config file, this is how it looks:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = ssh://[email protected]/myuserame/repo.git
    fetch = +refs/heads/*:refs/remotes/:origin/*

Any idea will be appreciated, Thanks.

like image 280
Ricardo Fornes Avatar asked Aug 18 '15 05:08

Ricardo Fornes


1 Answers

You can safely delete the [remote "origin"] section from your config file and reinitialize the remote settings in the CLI as if you had not yet done it for the repository in the first place.

like image 86
Robert Sandfield Avatar answered Sep 24 '22 01:09

Robert Sandfield