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.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android(安卓)图表开源框架之MPAndroidCh
  2. android开发每日汇总【2011-12-3】
  3. Android本地视频播放器开发--SDL编译
  4. Android之不要滥用SharedPreferences
  5. Android简明开发教程二十二:使用资源Resou
  6. Android(安卓)layout常见的属性大全
  7. Android简明开发教程二十二:使用资源Resou
  8. Android(安卓)API中文文档Button
  9. android中点击事件的4种写法
  10. Android开发软件