git代碼提交

系統:IOS 10git

git 版本 :1.9.3服務器

上傳項目:ssh

1.git init ------初始化項目,將項目歸入git的管理spa

2.git status----查看項目的狀態rem

3.git add * -----添加項目文件至暫存區it

4.git commit -m 「init project」 -----提交全部代碼到本地gitast

5.git remote add origin git@git.xxxx.cn:xxx/xxx.git-------設置源地址,該項目在服務器端的git上已建立服務器端

6.git push -u origin master -------推送至服務器上的master項目date

更新項目:rsa

  1. git add .-------更新

  2. git commit -m "update project" ------提交更新代碼到本地git

  3. git push origin master --------推送至服務器上的master項目

切換分支提交:

1.git branch develop

2.git checkout develop

4.git push origin develop

設置sshkey:

1.cd .ssh

2.ssh-keygen -t rsa -C "xxxx@xxxx.com.cn" -------"xxxx@xxxx.com.cn"是帳號

3.cat id_rsa.pub -------獲取key

4.將該key綁定到服務端

相關文章
相關標籤/搜索