如何使用 Android Studio 的 git hub 功能
How to use GitHub with Android Studio
This article will explain how to use GitHub with Android Studio.
Firstly, let’s login to github.com and create a new repository. From the top right corner of the screen, click the +sign and select New repository.
Now complete the form to create a new repository called testproject. Leave the Initialize this repository with a README unticked.
Next, open Android Studio and create a new project. Call your new application TestProject. Click Next to continue.
Leave the next page as default and click Next.
On the Add an activity to Mobile screen select Blank Activity and click Next.
In the next screen, leave the default activity name of MyActivity and click Finish.
Your new project will open in Android Studio. On the top menu, select VCS > Import into Version Control >Create Git Repository.
On the next screen, leave it all as default and click OK.
Now use Internet Explorer and navigate to the root of your projects folder. Right click and select Git Bash (If you do not see this option, then first install Git for Windows).
When the Git bash screen appears, type:
1
|
git remote add origin https: //github .com/[username]/[project_name].git |
An example of a Git repository URL is: https://github.com/markwint/testproject.git
Then press enter. The GitHub remote will be added to your Git repository.
Next, jump back into Android Studio, right click your projects root directory and select Git > Add. This will add all your project files to your Git repository.
It will seem like nothing has happened, but trust me, the project files are added.
Now right click the project name again and this time select Git > Commit Directory.
In the next screen, type a Commit Message and select Commit.
If a Code Analysis warning appears, click Commit. (Unless it’s a real project, in which case review and fix the issue before committing!)
Now, right click the project name, select Git > Repository > Push.
Check the box Push current branch to alternative branch and leave the branch name as master. Then select push.
Now enter your GitHub Login (email address) and Password. Then click OK.
If it’s all good, you will see this message.
Now your code is pushed to your GitHub repository. Don’t believe me? Logon and check for yourself.
Hope that was helpful.
- 顶
如何使用 Android Studio 的 git hub 功能的更多相关文章
- Android Studio配置Git及Git文件状态说明
Android Studio配置Git还是比较简单的,麻烦的是可能中间出现各种问题.如果你想了解或感兴趣,请往下看. 首先你得下载Git客户端,网址:http://git-scm.com/downlo ...
- 或许是介绍Android Studio使用Git最详细的文章
欢迎访问我的个人博客转发请注明出处:http://www.wensibo.top/2017/03/12/GitOnAS/ 前言 本文较长,图片很多很多,流量党慎入 使用Git已经有一段时间了,但是之前 ...
- Android Studio中Git和GitHub使用详解
一.Git和GitHub简述 1.Git 分布式版本控制系统,最先使用于Linux社区,是一个开源免费的版本控制系统,功能类似于SVN和CVS.Git与其他版本管理工具最大的区别点和优点就是分布式: ...
- Android studio使用git教程
①下载Git工具,配置到Android studio中 http://git-scm.com/downloads ------------------------------------------- ...
- Android studio配置Git
Android studio配置Git 1.下载window 版git并安装:下载地址 2.Android Studio设置git插件:File->Setting->Version Con ...
- Android Studio 通过 git update 或者 pull 的时候出错及解决办法
Android Studio 通过 git update 或者 pull 的时候出错,log 如下: Couldn't save uncommitted changes. Tried to save ...
- Win环境 Android Studio使用Git 教程 ( 一 )
一. 安装 下载安装完成Git后 进入命令行 输入命令git --version,如果能显示版本则说明安装成功,如果没有显示版本,需要配置环境变量: 在path中添加git的安装位置 二 . 配置信息 ...
- Android Studio的git功能的使用介绍
本文介绍Android Studio(下面简称AS)中git工具的一些简单使用.因为AS为git的使用提供了很多人性化的图形界面操作,在很大程度上可以增加开发效率.本文面向新手,题主自己也是新手一枚, ...
- Android Studio 2.2新功能预览
升级SDK可用Background 多加了个按钮,可用一边写代码一边下载SDK Instant Run 修改代码一秒启动 APK analyzer 分析任何的APK 查看APK下载包的大小,解压后的实 ...
随机推荐
- Java Eclipse常规设置
改变字体大小 eclipse英文版中如何去修改字体及方法?首先打开eclipse中,按下面的方法即可菜单项:window ->preferences -> general -> ap ...
- 加密传输SSL协议2_传统加密
原本到了睡觉的时间,但是做完了SSL的笔记还有GCC和Oracle等的好多的笔记,所以刻苦一点. The Priciple of Encryption/Decryption --conventiona ...
- 有关MyISAM引擎的锁定机制
本文介绍下,mysql数据库中MyISAM引擎的锁定机制的相关知识,感兴趣的朋友可以参考下. 本节内容: MyISAM引擎的锁定机制 在mysql数据库中,MyISAM存储引擎适合于读频率远大于写频率 ...
- 出现"无法连接synaptics定点装置驱动程序"
"开始“--”运行“--regedit(打开注册表)--依次打开 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVERSION/R ...
- [转载]给10万pv的WordPress选择最便宜高可用的硬件以及WordPress高并发支持
这些命令很长,但是希望可以让你很容易按照步骤创建一个全新的Linux服务器,使用Varnish, Nginx, W3 Total Cache, and WordPress来搭建一个WordPress博 ...
- Android RadioGroup/RadioButton
RadioGroup RadioButton的集合,提供多选一的机制 属性: android:orientation="horizontal/vertical&quo ...
- 超快速使用docker在本地搭建hadoop分布式集群
超快速使用docker在本地搭建hadoop分布式集群 超快速使用docker在本地搭建hadoop分布式集群 学习hadoop集群环境搭建是hadoop入门的必经之路.搭建分布式集群通常有两个办法: ...
- 基于jQuery的Jsonp跨域[Get方式]
由于目前的项目需要无刷新的跨域操作数据,整理了下自己使用的基于jQuery的Jsonp跨域[Get方式]. 代码如下: Javascript部分 $(function(){ $.ajax({ asyn ...
- php随笔2-php+ajax 实现输入读取数据库显示匹配信息
dropbox_index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...
- C语言入门(10)——if分支语句
在我们写的函数中可以有多条语句,但这些语句总是从前到后顺序执行的.除了从前到后顺序执行之外,有时候我们需要检查一个条件,然后根据检查的结果执行不同的后续代码,在C语言中可以用分支语句实现,比如: if ...