1、下載並安裝github客戶端http://git-scm.com/download/
2、打開android studio,測試github是否使用ok
點擊“test”,如果彈出下述窗口,這說明github安裝成功。
很不幸,我第一次點擊時彈出提示
“Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo”
在網站http://www.css88.com/archives/5183 以及http://mynameispagewood.com/web-development/osx-mavericks-git-error/ 找到了解決的辦法,在命令中輸入命令:
sudo xcodebuild -license
“This allowed me to view the X-code licence, and then agree to the terms. Voila, that’s it. Everything worked just fine after that.”
重新打開android studio,重新點擊“test”,測試ok
3、在android studio中輸入已經創建好的賬號和密碼
同樣,測試是否OK
4、第一次上傳本地工程到github
VCS->import into version control->share project on github
接下來不要修改什么,直接默認ok即可
5、更新代碼到github
右鍵module,Git
如果有要增加的文件,選擇add
如果有要修改的文件,選擇commit directory
最后的時候,一定要記得push,將修改的地方更新到github服務器
