Git: says origin already exists on “NEW” (init) repository, using shell but installed Github for Windows

前端 未结 3 717
旧巷少年郎
旧巷少年郎 2021-01-30 11:51

I installed Git for Windows, although I am using the shell not the Windows interface.

If I do a git init, and then try and do a

 git remote         


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 12:26

    I've been running into the same issue, and I think I've figured it out finally. GitHub for windows installs a version of PortableGit in /Users//AppData/GitHub. In the PortableGit directory, under /etc, there's a gitconfig file. This is the system config. It defines "origin" and "upstream", presumably with defaults that are meaningful to GitHub.

    I can't say for sure, but I started noticing this problem in the latest few updates of the GitHub for Windows client. Sadly, the release notes don't point to anything probative and the Windows client isn't open-source so it's hard to tell.

    I've sent a message to their support address, so I'll update here if I hear anything back.

    Edit: GitHub support responded saying this is a known issue and will be fixed soon.

提交回复
热议问题