命令行上传代码至github

把代码上传到 github 的相关软件和操作方式有很多。虽然现在有很多图形化工具,但是如果只是上传部分小 demo。用于个人开发,个人建议命令行来处理。

下面把命令行贴出来,供大家使用。

//1.通过命令行创建一个新的仓库并上传
…or create a new repository on the command line

echo "# autoDemo" >> README.md
git init
git add README.md
git commit -m "first commit"

//此处是本人的链接,不要直接复制
git remote add origin https://github.com/mynamaXXX/XXX.git
git push -u origin master

//2.push 到一个已有的仓库
…or push an existing repository from the command line

git remote add origin https://github.com/walkertop/autoDemo.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.

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

推荐阅读更多精彩内容