【一】管理路飞项目
- 忽略一下文件夹及文件
.idea
*.log
__pycache__
*.pyc
scripts
【二】忽视部分文件
初识化仓库
git init
Initialized empty Git repository in E:/Old Boy/luffy/luffyCity/.git/
查看仓库状态
git status
On branch master
No commits yet
Untracked files:
.gitignore
db.sqlite3
logs/
luffyCity/
添加管理文件
git add .
(venv) PS E:\Old Boy\luffy\luffyCity> git add .
warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git
touches it
(venv) PS E:\Old Boy\luffy\luffyCity> git status
On branch master
查看仓库状态
git status
(venv) PS E:\Old Boy\luffy\luffyCity> git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .gitignore
new file: db.sqlite3
new file: logs/__init__.py
new file: luffyCity/__init__.py
new file: luffyCity/apps/__init__.py
new file: luffyCity/apps/home/__init__.py
new file: luffyCity/apps/home/admin.py
new file: luffyCity/apps/home/apps.py
new file: luffyCity/apps/home/migrations/0001_initial.py
new file: luffyCity/apps/home/migrations/__init__.py
new file: luffyCity/apps/home/models.py
new file: luffyCity/apps/home/serializers/Banner_serializer.py
new file: luffyCity/apps/home/tests.py
new file: luffyCity/apps/home/urls.py
new file: luffyCity/apps/home/views.py
new file: luffyCity/apps/user/__init__.py
new file: luffyCity/apps/user/admin.py
new file: luffyCity/apps/user/apps.py
new file: luffyCity/apps/user/migrations/0001_initial.py
new file: luffyCity/apps/user/migrations/__init__.py
new file: luffyCity/apps/user/models.py
new file: luffyCity/apps/user/tests.py
new file: luffyCity/apps/user/urls.py
new file: luffyCity/apps/user/views.py
new file: luffyCity/asgi.py
new file: luffyCity/db.sqlite3
new file: luffyCity/utils/common_middleware.py
new file: luffyCity/utils/common_mixin.py
new file: luffyCity/utils/common_models.py
new file: luffyCity/utils/common_response.py
new file: luffyCity/utils/common_settings.py
new file: luffyCity/wsgi.py
new file: manage.py
提交注释
- 将所有文件提交到本地仓库
git commit -m '第一次路飞测试'
(venv) PS E:\Old Boy\luffy\luffyCity> git commit -m '第一次路飞测试'
[master (root-commit) beffe8d] 第一次路飞测试
48 files changed, 748 insertions(+)
create mode 100644 .gitignore
create mode 100644 db.sqlite3
create mode 100644 logs/__init__.py
create mode 100644 luffyCity/__init__.py
create mode 100644 luffyCity/apps/__init__.py
create mode 100644 luffyCity/apps/home/__init__.py
create mode 100644 luffyCity/apps/home/admin.py
create mode 100644 luffyCity/apps/home/apps.py
create mode 100644 luffyCity/apps/home/migrations/0001_initial.py
create mode 100644 luffyCity/apps/home/migrations/__init__.py
create mode 100644 luffyCity/apps/home/models.py
create mode 100644 luffyCity/apps/home/serializers/Banner_serializer.py
create mode 100644 luffyCity/apps/home/tests.py
create mode 100644 luffyCity/apps/home/urls.py
create mode 100644 luffyCity/apps/home/views.py
create mode 100644 luffyCity/apps/user/__init__.py
create mode 100644 luffyCity/apps/user/admin.py
create mode 100644 luffyCity/apps/user/apps.py
create mode 100644 luffyCity/apps/user/migrations/0001_initial.py
create mode 100644 luffyCity/apps/user/migrations/__init__.py
create mode 100644 luffyCity/apps/user/models.py
create mode 100644 luffyCity/apps/user/tests.py
create mode 100644 luffyCity/apps/user/urls.py
create mode 100644 luffyCity/apps/user/views.py
create mode 100644 luffyCity/asgi.py
create mode 100644 luffyCity/db.sqlite3
create mode 100644 luffyCity/libs/__init__.py
create mode 100644 luffyCity/media/banner/1.jpg
create mode 100644 luffyCity/media/banner/2.jpg
create mode 100644 luffyCity/media/banner/banner1.png
create mode 100644 luffyCity/media/banner/banner2.png
create mode 100644 luffyCity/media/banner/banner3.png
create mode 100644 luffyCity/media/banner/banner4.png
create mode 100644 luffyCity/media/icon/1.jpg
create mode 100644 luffyCity/settings/__init__.py
create mode 100644 luffyCity/settings/dev.py
create mode 100644 luffyCity/settings/prod.py
create mode 100644 luffyCity/urls.py
create mode 100644 luffyCity/utils/__init__.py
create mode 100644 luffyCity/utils/common_exceptions.py
create mode 100644 luffyCity/utils/common_logger.py
create mode 100644 luffyCity/utils/common_middleware.py
create mode 100644 luffyCity/utils/common_mixin.py
create mode 100644 luffyCity/utils/common_models.py
create mode 100644 luffyCity/utils/common_response.py
create mode 100644 luffyCity/utils/common_settings.py
create mode 100644 luffyCity/wsgi.py
create mode 100644 manage.py
查看仓库状态
git status
(venv) PS E:\Old Boy\luffy\luffyCity> git status
On branch master
nothing to commit, working tree clean
【三】推送路飞项目至远程仓库
【1】建立远程仓库
【2】添加远程仓库地址
git remote add origin https://gitee.com/chi-meng/luffy-project.git
【3】推送项目
- 注意这里上面我已经在本地仓库缓存过了
- 所以直接推上去
git push origin master