Androidstudio Project sharing to Git@osc hosting

Source: Internet
Author: User

Androidstudio project sharing to [email protected] hosting.

First, inOSC Create warehouse

For example, to create a androidstudy warehouse, create the following steps:

Enter the warehouse name

Click the Create button to complete the creation of the warehouse, as shown in:

Once created, you can get an HTTP connection to the [email protected] Repository

Https://git.oschina.net/nycly/StudyGit.git

Ii. Escrow of the project togit repository2.1. Turn the project into a git project

Create an Android project in Androidstudio, then turn the project into a git project, step: Vcs--import into Version control--create git Repository Select your local item in the popup window

In the. gitignore file, the contents of the edits, the files and folders do not need to be submitted, then we git add, the file will not add

2.2. associating local git to a git server

Use Git bash to enter the project root directory as shown in:

Execute the following command:

Git remote add Origin https://git.oschina.net/nycly/StudyGit.git

There are other files in the remote repository, but not in the local project, as shown in:

Use: The GIT pull Origin Master command takes the three files from the remote repository to a local project, as shown in:

Push successfully, you can go to open source China's Git repository above to view, as shown in:

As you can see, all the files have been submitted to the remote repository.

Let's modify mainactivity and add a test method, as shown in:

Then commit the mainactivity to the remote repository as shown in:

Submit the mainactivity and push it to the remote repository, the CAs see the modified content as shown in the remote repository:

Iii. downloading items from a remote repository

Delete the local project first, start Androidstudio, and download the project code from Git, as shown in:

Copy the Git address of the repository from the remote repository:

You can click the Test button to test if the URL address of the GIT repository is valid, as shown in:

Click the "Clone" button to download the project from the remote repository locally, as shown in:

Androidstudio project sharing to [email protected] Hosting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.