收集已安装全部依赖
[root@localhost blogproject]# pip freeze > requirements.txt
安装git
[root@localhost blogproject]# yum install git
配置提交参数
[root@localhost blogproject]# git config --global user.email "xxx@163.com"
[root@localhost blogproject]# git config --global user.name "xxx"
初始化本地库
[root@localhost blogproject]# git init
Initialized empty Git repository in /opt/Code/Django/blogproject/.git/
将当前文件夹所有添加到本地库中
[root@localhost blogproject]# git add .
设置提交备注
[root@localhost blogproject]# git commit -m "first commit"
[master (root-commit) b64a104] first commit
设置远程库参数
[root@localhost blogproject]# git remote add origin https://github.com/xxx/django.git
开始提交
[root@localhost blogproject]# git push -u origin master
Username for 'https://github.com': xxx
Password for 'https://xxx@github.com':
Counting objects: 106, done.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (106/106), 304.91 KiB | 0 bytes/s, done.
Total 106 (delta 25), reused 0 (delta 0)
remote: Resolving deltas: 100% (25/25), done.
To https://github.com/xxx/django.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.