1. 程式人生 > >使用git 上傳項目到gitee/github

使用git 上傳項目到gitee/github

clas detail spa lob tps tee src 第一次 .com

參考: https://blog.csdn.net/qq944639839/article/details/79864081


註意:在此之前需要設置ssh公匙

在本地項目文件中使用bash

$ git config --global user.name "你的名字"

$ git config --global user.email "你的郵箱"

1. 初始化

$ git init

$ git remote add origin https://gitee.com/xxx/xxx.git (你的遠程項目地址)

2.克隆一下

$ git clone https://****.git (你的遠程項目地址)

如果項目是空的,則需要進行 第一步與第二步

3. 提交

$ git pull origin master

$ git add .

$ git commit -m "提交描述"

$ git push origin master

技術分享圖片

完成了第一次提交

使用git 上傳項目到gitee/github