Pushing doesn't set up a remote called origin
; only cloning does.
You can fix this by running git remote add origin <URL of remote repo>
, or by renaming devgit
with git remote rename devgit origin
.
Question
Not sure what I did wrong, but I started with a local repository, then pushed it to remote. (Yes, I am new.) My .git/config
shows:
[remote "devgit"]
url = devgit:groupname/product
fetch = +refs/heads/*:refs/remotes/devgit/*
I really expected that except in the url
entry, that "devgit"
should be "origin"
. I have another repo where that is the case.
Can I change this to origin? If so, how? I want people to be able to push/pull from this repo consistently with the way they do others. What is the likely error I made setting up the remote? (I assume that is when it went awry.)
Also, this .git/config
does not yet have a [branch "master"]
section. Exactly what will cause that to take place?
La solution
Pushing doesn't set up a remote called origin
; only cloning does.
You can fix this by running git remote add origin <URL of remote repo>
, or by renaming devgit
with git remote rename devgit origin
.