ubuntu 上传文件 源码到 github

1 注册github帐号,创建new repository

网站注册账号之后。再GitHub网站里点击new repository后出现了以创建repository页面。

填写repository name ,勾选Initialize this repository with a README后,就可以下一步了。(右侧有这个repository的地址,复制之后在Linux命令行中进行之后的操作。)

2 安装git 控件

Ubuntu中没有git,可以使用sudo apt-get install git命令安装git。

for-python@ubuntu:~$ sudo apt-get install git
  • 1

这里写图片描述

3 登录git:

git config --global user.email "18790166674@163.com"
git config --global user.name "FengWeilei"
  • 1
  • 2

4 上传文件:

4.1 创建github本地文件夹(存放github仓库代码)

for-python@ubuntu:~$ mkdir github
  • 1
  • 2

4.2 复制刚才在gitbub网站上创建的FlaskApp到github文件夹:

for-python@ubuntu:~$ cd github
for-python@ubuntu:~/github$ git clone https://github.com/FengWeilei/FlaskApp.git
  • 1
  • 2

4.3 把需要上传的文件复制到本地github仓库(FlaskApp文件夹),在从本地仓库上传到github网站

这里写图片描述

for-python@ubuntu:~/github$ cd FlaskApp
for-python@ubuntu:~/github/FlaskApp$ git add flaskapp
for-python@ubuntu:~/github/FlaskApp$ git commit -m "added flaskapp"
for-python@ubuntu:~/github/FlaskApp$ git push
Username for 'https://github.com': FengWeilei
Password for 'https://FengWeilei@github.com': 
Counting objects: 9, done.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 1.51 KiB | 0 bytes/s, done.
Total 9 (delta 0), reused 0 (delta 0)
To https://github.com/FengWeilei/FlaskApp.git
   bc64adf..920472f  master -> master

(把git congig 环节放到了前面,)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

这里写图片描述

4.4 大功告成,回github网站,刷新后发flaskapp上传成功了。

这里写图片描述

原文:http://blog.csdn.net/sinat_36651044/article/details/73776629


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值