git 提交到远程库基本命令

…or create a new repository on the command line
echo "# autofun" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/jd2017/autofun.git git push -u origin master
…or push an existing repository from the command line
git remote add origin https://github.com/jd2017/autofun.git git push -u origin master
…or import code from another repository
You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
git 常用命令:
建分支:git branch test
切换分支:git checkout test
查看分支:git branch
删除分支: git branch -d test

error: src refspec master does not match any.
引起该错误的原因是,git提交空目录上去造成的,添加文件后提交解决;

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 本文作者陈云峰,转载请注明。 这篇文章记录个人常用的一些命令,和记不住的一些命令,转载了并不断更新。 Git官网 ...
    陳云峰阅读 2,869评论 0 24
  • 1.登录iOS 开发者中心 点击账户2.png3.第一个是添加团队成员 第二个是 发布&调试 证书 &描述文件 ...
    NieFeng1024阅读 873评论 0 1
  • 今天是连续写作的第35天,不禁有点暗暗佩服自己。个人历史上从来没有过连续坚持这么多天的写作,虽然写作的文稿还很粗糙...
    明月清风舟阅读 389评论 0 2
  • 我们知道,基本上每个 APP 都会有启动引导图,就是启动 APP 时能够左右滑动的大图,滑动到最后一页时,再左滑或...
    Vivi成长吧阅读 5,247评论 0 5
  • 今天又是星期一,下午看见老师在群里发的作业,还是让他们认识二级生字,标拼音,晚上回来把生字又标了一遍拼音,...
    耿浩然妈妈阅读 202评论 0 5