Ubuntu 16.04 下使用git 命令行上传到github

首先,确保git已经成功的安装好了

然后在github上新建一个仓库:例如MyTest

使用git bash命令行:

1 . create a new repository on the command line

在本地磁盘中新建一个空文件夹:例:MyTest
cd MyTest

git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/643435675/MyTest.git
git push -u origin master

2 . push an existing repository from the command line

git remote add origin https://github.com/643435675/MyTest.git
git push -u origin master

可以看下截图:我上传django_blog的代码

Ubuntu 16.04 下使用git 命令行上传到github_第1张图片
这里主要是push到github上的操作.png

ending......

你可能感兴趣的:(Ubuntu 16.04 下使用git 命令行上传到github)