문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top