Getting started with GitHub for Android development-suitable for primary school students

Source: Internet
Author: User
Tags git client git client download using git git commands

Getting started with GitHub for Android development-suitable for primary school students
Use the AndroidStudio project to publish it to GitHub. Create a new project setting in AndroidStudio: Settings-> Version Control-> Git, set the git directory, and click Test. If the project is successful, a Success prompt is displayed.


3. Set: Settring-> VersionControl-> GitHub, set your github account and password, and click Test. If the Test succeeds, a Success prompt is displayed.

4. Share a Project: VCS-> Import into Version Control-> Share Project on GitHub. Click it and set the repository name (if you have set MasterPassword, a dialog box will pop up asking you to enter the password .)


Click Share to view the new repository on GitHub.

You can also see version control Git under CVS in AndroidStudio:

This setting has been successfully set. As for how to use it, that is, git add, git commit, git push...
5. If you want to remove the association, you only need Settrings-> Version Control to delete the association.

Of course, this is also a prerequisite:
1. Install the Git client download link
2. Have a GitHub account

I usually don't need this method, because I still want to learn some git commands.

Use the git command to upload a local repository to GitHub.

Use GitHub to register an account first:
And in your account (here is my https://github.com/zilianliuxue? Tab = repositories) to operate

Create a warehouse on

Click the New repository button to go to the page shown below:

Follow these steps to enter the repository name (required), description (optional), and click Create repository, as shown in:

The repository is built.

Install Git and Github on your computer

Git: https://git-scm.com/downloads

Github: https://desktop.github.com/

After git is installed, right-click it, as shown in the following figure:

Note: Documents on the computer can be uploaded to github. ssh key is required.
For details, see Settings-> SSH Keys.
The specific steps can be followed by official documents:

Address also attached: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

Open
The repository created on github appears.

Select a repository and clone it to the desired location

But I am still used to using git bush

Git clone https://github.com/zilianliuxue/Demo.git

The repository folder is generated under the corresponding file address.

Initial folder

Right-click the Directory and select Git Bash Here
Enter the github user name Email:
Git config-global user. name "github user name"
Git config-global user. email "github mailbox"

Confirm that the file exists, and there is no document like github at present ....

Go ahead and put the project files in this warehouse.

Copy the document I want to save to the repository folder.
Enter git status

Is there any file you copied...

Actually, it prompts you, use "git add ..."....
Enter git add.

Do not miss it ~~~ See clearly

Ignore warning

In this way, these documents are available in the repository.

Then retrieve his status

Git status

Okay, these files are generated, and you are told to commit ,,

Generated. Do you know what else to do, right? git status

Because he will tell you what to do next ,,

Just do

Then git status is ready. You can see

Note: if there are still, just follow the prompts as before ....
Everything is fine. Go to gitHub and check it out ..
In fact, it's still the last step ,,
Return to the Command window.
Input: git push origin master

The pop-up box tells you to enter the user name and password !!


If you make a mistake, you will be asked to lose again.
Upload started ~~ ,,,

After that, let's go to github. I didn't play with you this time...

All of them are there. Don't play with you ..

Then the one in the desktop version records our change history. All changes will be recorded !!!

Related Article

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.