1. 本地项目

1.1 本地电脑中已创建了django项目tracer

2.2 添加local_settings

1.3 添加.gitignore文件

# pycharm
.idea/
.DS_Store
__pycache__/
*.py[cod]
*$py.class


# Django stuff
local_settings.py
*.sqlite3

#database migrations
*/migrations/*.py
!*/migrations/__init__.py

  

2.下载安装git,注册码云账号

https://git-scm.com/downloads

https://gitee.com/

3.创建仓库

使用码云管理项目代码,设置.gitignore

 

 创建完成后,如果git没有过账号配置需要进行账号配置

以我的为例:

git config --global user.name "李成广"
git config --global user.email "lcgsmile@qq.com"

4.初始化本地仓库

在项目根路径下使用git init命令,将其设置成一个git仓库

(dilu) D:\11-51Code\tracer>git init
Initialized empty Git repository in D:/11-51Code/tracer/.git/

(dilu) D:\11-51Code\tracer>git add .

(dilu) D:\11-51Code\tracer>git commit -m "第一次提交"

然后执行下面命令

git remote add origin https://gitee.com/lichengguang/trace.git

更新到码云只要在执行

git push origin master

  

之前写过一篇git的文章:https://www.cnblogs.com/0bug/p/8708827.html

 

Thanks!

相关文章:

  • 2021-04-13
  • 2021-06-10
  • 2022-12-23
  • 2021-12-10
  • 2021-07-28
  • 2021-12-03
  • 2021-10-25
猜你喜欢
  • 2021-06-07
  • 2021-06-18
  • 2021-08-05
  • 2021-12-06
  • 2021-08-05
  • 2021-11-23
  • 2021-12-29
相关资源
相似解决方案