• Shopping Cart Shopping Cart
    0Shopping Cart
London App Developer
  • Courses
  • Consulting
  • Tutorials
  • About
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Android and Github software logos on a turquoise background
Android, Android Studio, Git

How to clone a GitHub project on Android Studio

Learn how to build a REST API: Build a Backend REST API with Python & Django – Advanced

You may have read/watched my previous tutorial How to use GitHub with Android Studio 1.x. This is a follow up tutorial which explains how to clone a project that has been added to GitHub. 

Prefer a video?

Let’s dive right into it.

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 choose Commit 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

If you login to Git and browse to your repository, you will see that the changes have been pushed.

GitHub Commits page

Thanks for reading. I hope you found this help? If you have any questions please let me know in the comments below.

Cheers,
Mark

Learn how to build a REST API: Build a Backend REST API with Python & Django – Advanced

Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://i0.wp.com/londonappdeveloper.com/wp-content/uploads/2015/02/How-to-clone-a-GitHub-project-on-Android-Studio.png?fit=277%2C223&ssl=1 223 277 mark https://londonappdeveloper.com/wp-content/uploads/2018/12/lon_website_logo-300x110.png mark2015-02-21 14:53:562022-01-12 10:34:32How to clone a GitHub project on Android Studio
6 replies
  1. Ebrahim
    Ebrahim says:
    July 6, 2015 at 1:01 pm

    I’m getting an error and it says it cannot find the file specified

    Reply
  2. menak
    menak says:
    September 29, 2015 at 8:38 am

    i am getting an error like that file cannot resolve affollested alert material. i just want to pull that from git to studio.

    Reply
  3. Ivan
    Ivan says:
    December 22, 2015 at 6:32 pm

    Thanks a lot! It works!

    Reply
  4. sittichai
    sittichai says:
    April 4, 2016 at 4:12 am

    Very good tutorial, That is work for me, Thanks.

    Reply
  5. sdembla
    sdembla says:
    October 27, 2016 at 8:01 pm

    Hi Mark,

    In the VCS Repository URL: https://www.github.com/username/projectname

    Instead of that, can I write: file:///myservername/folder1/folder2/projectname
    if I am using another computer as my server instead of github.com server.

    Also, is this “file:///myservername/folder1/folder2/projectname” the correct way to write VSC Repo URL. I am stuck. Please let me know

    Reply
  6. Maaz Bin Musa
    Maaz Bin Musa says:
    May 27, 2017 at 3:43 pm

    Can you guide me to the link where you show when not to push to master branch?
    Also there was a button for pull right above push. When and where would we use that?

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Pages

  • About
  • Consulting
  • Home
  • Tutorials

Categories

  • AI
  • Android
  • Android Studio
  • Angular
  • Aptana Studio
  • AWS
  • Bootstrap
  • Career advice
  • Celery
  • Databases
  • Deployment
  • DevOps
  • Django
  • Django REST Framework
  • Docker
  • Eclipse
  • Getting Help
  • Git
  • Git Bash
  • Git Flow
  • GitHub Actions
  • Google App Engine
  • IDE
  • Ionic Framework
  • iOS
  • JavaScript
  • Job Search
  • Links
  • Linux
  • Mac OS X
  • macOS
  • Node.JS
  • OpenAI
  • PGAdmin
  • Postgres
  • Productivity
  • Python
  • React
  • Salt Stack
  • Stack Overflow
  • Tools
  • Travis-CI
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Vagrant
  • VSCode
  • WebSockets
  • Windows 10
  • WordPress

London App Developer Ltd,

71-75 Shelton Street, Covent Garden, London, United Kingdom, WC2H 9JQ

Company registration number: 09718346

© London App Developer - London App Developer Ltd, Company Registration Number: 09718346, VAT: GB224061842
  • Link to X
  • Link to Youtube
  • Link to Facebook
  • Link to Reddit
Link to: How to remove a git remote Link to: How to remove a git remote How to remove a git remoteGit logo on a bright green background image Link to: Making WordPress comments form work with Bootstrap 3 Link to: Making WordPress comments form work with Bootstrap 3 WordPress logo on top of a pink polka-dot background imageMaking WordPress comments form work with Bootstrap 3
Scroll to top Scroll to top Scroll to top

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.

OKLearn more

Cookie and Privacy Settings



How we use cookies

We may request cookies to be set on your device. We use cookies to let us know when you visit our websites, how you interact with us, to enrich your user experience, and to customize your relationship with our website.

Click on the different category headings to find out more. You can also change some of your preferences. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

Essential Website Cookies

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refusing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

Google Analytics Cookies

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

Other external services

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

Other cookies

The following cookies are also needed - You can choose if you want to allow them:

Privacy Policy

You can read about our cookies and privacy settings in detail on our Privacy Policy Page.

Privacy Policy
Accept settingsHide notification only