教你使用mac上傳本地iOS代碼到github


1.顧名思義,首先你得注冊一個github賬戶 這個我就不細說了。

2.然后你得創建一個 repository  步驟見下圖

 

3.相當於創建成功 會跳到下圖界面 

4.一看就很清楚了 

create a new repository on the command line 意思就是讓你把下面的命令行在終端安裝順序執行就可以了,最后你刷新就會看到已經上傳好的項目文件了。

 以下是網上搜羅的git 常用命令

更新代碼

cd /d/TVCloud
git add .
git commit -m "update test" //檢測文件改動並附加提交注釋
git push -u origin master //提交修改到項目主線

github常用命令

git push origin master //把本地源碼庫push到Github上
git pull origin master //從Github上pull到本地源碼庫
git config --list //查看配置信息
git status //查看項目狀態信息
git branch //查看項目分支
git checkout -b host//添加一個名為host的分支
git checkout master //切換到主干
git merge host //合並分支host到主干
git branch -d host //刪除分支host


免責聲明!

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



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