Android Development GitHub's getting started using process---"for elementary students

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

This is an introductory article for not uploading code to GitHub, of course, there are fewer git commands to learn, and it's a good idea to get git advice on the website of the Great God Liaoche.

Publish to GitHub using the Androidstudio project
    1. Create a new project in Androidstudio
    2. Settings: Settings, Version Control, git, set git directory, click Test, if successful there will be success hint


3. Settings: settring, VersionControl, GitHub, set your own github account, password, click Test, if successful there will be success prompt

4. Share project: VCS, Import into Version Control---Share project on GitHub, click to Start setting Repository name (if you have set up Masterpasswo Rd will pop up a dialog box to fill in the password.)


After clicking on share, you'll be able to see the new warehouse on GitHub.

Version control Git can also be seen in Androidstudio under CVS:

This is already set up successfully. As for how to use, that is, git add, git commit, git push ...
5. If you want to disassociate, you only need to settrings, Version Control to delete the association.

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

I do not normally use this method, because I still want to learn some git commands.

Uploading to GitHub using the local repository with GIT commands

Use GitHub to sign up for an account first:
In your account (here is my https://github.com/zilianliuxue?tab=repositories) to operate

New Warehouse on

After clicking on the new Repository button, go to the page shown:

Follow the above steps, fill in the warehouse name (required), description (optional), click the Create Repository button, as shown in:

The warehouse was built.

Need to install Git on your PC, and GitHub

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

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

After the GIT installation is complete, right-click for example:

Note: Documents on your computer can be uploaded to GitHub and require SSH key
Specific to SSH Keys, settings
The exact steps can be followed by the official documentation:

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

When the above is complete, open
There will be a warehouse just built on GitHub.

Select the warehouse and clone to the place you want to put it

But I'm still used to the Git bush.

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

The repository folder will be generated under the corresponding file address.

Initial folder

In this directory, right-click and choose Git Bash here
Enter the GitHub username mailbox:
git config–global user.name "GitHub user name"
git config–global user.email "GitHub Mailbox"

Verify that the file exists, and that there are currently no documents like GitHub ....

You're going to put it in the warehouse and put it in the project.

I'm going to put a copy of the document into the Warehouse folder.
Enter git status

A few appeared you copy the past documents have no ...

In fact, it prompts you, use "git add ..." ....
Enter git Add.

Do not miss the point, ~ ~ ~ See clearly OH

Ignoring warnings

This is the document under the warehouse.

To get his state again.

git status

Well, that generates these files, and then tells you to commit, that

Generated well, and know what to do again, yes or git status

Because he's going to tell you what to do next,

Do

Then git status is good, you see

Note: If there is, as before, follow the instructions to do just fine ....
All is well, go to GitHub to see.
In fact, the last step,
and back to the command window.
Input: Git push Origin master

Out of the box called you lose the user name password is right!!


The wrong one will tell you to lose again.
Start uploading ~ ~ 、、、

It's done, and then go to GitHub to see, this time I did not play you ...

You've got it, you're not kidding me.

And then the desktop version of the record of our history of change, if changed, will record!!!

Android Development GitHub's getting started using process---"for elementary students

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.