1. 程式人生 > >Android Studio 引入 Git 並提交程式碼

Android Studio 引入 Git 並提交程式碼

  • File -> Settings -> Version Control -> Git -> Path to Git executable -> 選擇本地 Git 可執行檔案 -> Test

  • VCS -> VCS Operations Popup -> Git

  • 專案結構切換為 Project -> 專案名資料夾上右鍵 -> Git -> Add

  • 專案結構切換為 Project -> 專案名資料夾上右鍵 -> Git -> Commit Directory -> 填寫 Commit Message -> Commit

  • 專案結構切換為 Project -> 專案名資料夾上右鍵 -> Git -> Respository -> Remotes -> 右邊的加號 -> url 填寫 git 伺服器的 git 倉庫地址,比如 ssh://[email protected]:27/home/git/android.git

  • 專案結構切換為 Project -> 專案名資料夾上右鍵 -> Git -> Respository -> Remotes -> Push