最近几天用到了git,作为只看过教程,没有在实际项目中使用过的人来说,简直是 T_T ......
在这里记录一下,以防以后忘记。
> git add . > git commit -m "new commit" > git push
fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. : 可能是由于 .git/config 中配置不当,搜到了这篇文章(http://www.myexception.cn/operating-system/1470149.html),笔者贴上了一个模板,如下:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = https://github.com/CrossLee/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = https://github.com/CrossLee/xxx.git
[branch "master"]
remote = origin
merge = refs/heads/master
其中 url pushurl 换成自己的项目地址。
原文:http://www.cnblogs.com/noteit/p/5255769.html