Fork me on GitHub

随笔 - 997  文章 - 5  评论 - 181  阅读 - 300万 

一 首先在Github新建一个仓库,回到首页,点击右上角的New repository新建仓库。

 

二  在本地依次使用下面命令

…or create a new repository on the command line

 
echo "# opus" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/DyLanCao/opus.git
git push -u origin master

…or push an existing repository from the command line

 
git remote add origin https://github.com/DyLanCao/opus.git
git push -u origin master

三 问题
1 输入:
git remote add origin https://github.com/DyLanCao/opus.git
上报错误:fatal: remote origin already exists.

解决方法:
首先:git remote rm origin
然后再使用命令:git remote add origin https://github.com/DyLanCao/opus.git
posted on   虚生  阅读(315)  评论(0编辑  收藏  举报
编辑推荐:
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2016-11-08 ubuntu-14.10下,安装gcc交叉编译器遇到问题及解决方法
点击右上角即可分享
微信分享提示