1.測試本地git
File->Settings->Git
Path to git executable:/usr/bin/git
測試
2.GitHub配置
填寫用戶名密碼然後測試是否能連上
3.創建本地git倉庫
VCS–>Import into Version Control–>Create git Repository
選擇工程根目錄作爲git倉庫
4.添加文件到git倉庫
Project視圖選擇項目名右擊–>Git–>Add
添加後變成了綠色
5.上傳項目到github
VCS–>Import into Version Control–>Share Project on github
直接點擊share即可
出現:
Can’t create repository: SerialPort 422
Unprocessable Entity - Repository creation failed.
fix:密鑰問題
把密鑰傳給github即可
直接點擊share分享
https://github.com/Kylinshui/SerialPort
項目參考:https://github.com/cepr/android-serialport-api
由Android Studio完成