从github 下载项目 , 并且提交

Part 1: Cloning the Project

Step 1 – Load Android Studio and select Check out project from Version Control

Android Studio 1.x welcome screen checkout option

Step 2 – Select GitHub from the drop down list

Android Studio Checkout From Options

Step 3 – Enter your GitHub credentials. Then click Login

Android Studio Login to GitHub Screen

Step 4 – Fill out the Clone Repository form and click Clone

Fill out the following items:

  • Vcs Repository URL: The URL of your repository on GitHub
  • Parent Directory: The local directory where you want to store this project
  • Directory Name: The name of your project

Android Studio clone repository form

 Step 5 – Open the project

You will be prompted with a message asking you would like to open the project in Android Studio. Click Yes.

Android Studio checkout from version control

The project will now open in Android Studio:

Android Studio Project

Part 2: Committing Changes to GitHub

Now that we have checked out and opened the project, this next part explains how to commit changes.

Step 1 – Enable Version Control Integration

From the top bar select VCS > Enable Version Control Integration

Android Studio enable Version Control Integration option

Then select Git from the dropdown box

Android Studio enable version control integration

Step 2 – Make a change to the project

Make any change, for the purpose of this tutorial I simply modified the strings.xml file to change the “Hello World!” text to read “Hello London App Developer!”.

Android Studio hello world text modified to read 'Hello London App Developer'

 Step 3 – Commit the change

On the top right hand side of Android Studio, right click the project name, select git and chooseCommit Directory

Android Studio commit directory project option

In the Commit Changes screen, ensure all the files are checked and type a Commit Message. Then click Commit to commit your changes.

Android Studio Commit Changes screen

Next you will see the below message:

Android Studio commit success message

Step 4 – Push your changes to GitHub

Next, select the project name in the top left corner, then choose Git > Repository > Push.

Android Studio push git repository

When you see the Git Push screen, click Push.

Android Studio git push screen

If this works, you will see the Push successful message.

Android Studio git push successful




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值