1.创建readme.md文件,初始化本地路径
zelin@2018:~$ echo "# python-" >> README.md
zelin@2018:~$ git init
#返回值
初始化空的 Git 仓库于 /home/zelin/.git/
zelin@2018:~$ git add README.md
2.配置用户名及邮箱
zelin@2018:~$ git config --global user.name "hgycxd"
zelin@2018:~$ git config --global user.email "121246784@qq.com"
3.提交连接
zelin@2018:~$ git commit -m 'hgycxd'
#返回值
[master (根提交) 2cb5eb4] hgycxd
1 file changed, 1 insertion(+)
create mode 100644 README.md
4.创建成功,刷新界面即可上传文件
zelin@2018:~$ git remote add hgycxd https://github.com/hgycxd/python-.git
zelin@2018:~$ git push -u hgycxd master
#返回值:
Username for 'https://github.com': hgycxd
Password for 'https://hgycxd@github.com':
对象计数中: 3, 完成.
写入对象中: 100% (3/3), 211 bytes | 0 bytes/s, 完成.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/hgycxd/python-/pull/new/master
remote:
To https://github.com/hgycxd/python-.git
* [new branch] master -> master
分支 master 设置为跟踪来自 hgycxd 的远程分支 master。