使用碼雲管理項目代碼,設置.gitignore


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.創建倉庫

 

 創建完成后,如果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!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM