I am a beginner in Git I get this strange behavior :
1 / When i push some code, Git says '=' is not an URL !!
git push -u origin master
---> fatal: '=' does not appear to be a git repository
2 / So i check the config, and i see 2 "push" URLs are equal to "="
git config --list
---> ...
remote.origin.url==
remote.origin.url==
[email protected]:<name>/<project>.git (push)
remote.origin.fetch= refs/heads/*:refs/remotes/origin/*
How can i correct that error ??? the.git/config file seems to be normal
CodePudding user response:
First, use git config --list --show-origin
to determine where the empty values come from, output will be something like this:
file:.git/config remote.origin.url==
file:/other/directory/config remote.origin.url==
Then remove the config lines from those files.
CodePudding user response:
Edit .git/config
to remove two blank URLs.
[remote "origin"] // Search this section.
Notice: .git
is a hidden folder in your project root directory.