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