How to upload Android Studio project to github

Several steps need to be done if you want to upload a project,first of all,finish the project and make sure it works.

Pre-condition:

  • Already get git installed in PC.
  • Finish the project and it works.
  • Note the path of the project,probably on top of the Android Studio interface.

Steps to upload:

  1. Create a repository in github,and copy the remote repository URL.
  2. Open git bash,change directory to the work station,use command "cd XXX".
  3. Better create the file "README.md",use command "touch README.md".
  4. Initialize the local directory as a git repository,use command "git init"
  5. Add the files in the new local repository,stages them for the first commit.use command "git add ."
  6. Commit the files you've staged in my local repository,use command "git commit -m "XXX"".
  7. Add the URL for the remote repository,use command "git remote add origin URL".
  8. Push the changes in local repository to github,use command "git push origin master".

"git add ." means add all the files in local repository.

So after first commit,if changes are made to the project and need to be pushed to github,better use Git Gui,for sure which will save a lot of work.

This is the original link,adding an existing project to github by command line.

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容