AndroidStudio使用Git發佈與更新,同步,關聯github

  1. 安裝git。

Git下載地址:https://git-scm.com/download

下載完成後安裝,一路Next就好。

 

2.在androidstudio上設置github帳號。

File--settings--Version control --GitHub,Auth type選擇password,輸入帳號,點Test。

成功後有提示。

2. 配置git工具。

File--settings--Version control --Git,然後選擇git的安裝目錄下bin 目錄下的git.exe。

3. 然後Enable Version Control Integration,選擇Git,點ok。之後update和commit按鈕就變亮了。

4. 爲項目添加Git版本控制,具體是方法是:(點擊順序) VCS-->>import info Version Control -->>Creat Git Repository...

5. 然後繼續點擊VCS-->>Import into Version Control -->>Share Project on Github

寫上描述 看到選中的代碼,提交完成後代碼就傳到Git上了

 

6.提交代碼到gitHub

點擊commit,再彈出的窗口上把鼠標滑到Commit那裏,記住,不是點擊

然後點擊Commit and Push,開始提交到Github.

 

7. 更新代碼

如果當前打開的就是正要同步的項目,直接點擊Update就好。

如果當前打開的項目不是你要同步的這個項目,那麼,請點擊VCS-->>Checkout from Version Control-->>Git找到github上的地址填進去,並選好本地路徑,更新後打開。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章