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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容