记录github错误
Posted yong2128
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了记录github错误相关的知识,希望对你有一定的参考价值。
困扰已久的问题,用git push origin master 命令push项目到github上时,总是出现:
fatal : ‘origin’ does not appear to be a git repository
这样的错误,问题在于.git目录下的config文件中只有[core],没有[remote "origin"]和[branch "master"]信息:
[
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://github.com/github名/仓库名
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
就好啦! ^_^
以上是关于记录github错误的主要内容,如果未能解决你的问题,请参考以下文章