Hosting your own code on GitHub

Source: Internet
Author: User
Tags hosting git client

Steps:

1. Build Your own GitHub
2. Install the GitHub client and configure the identity
3. Build a GitHub Project
4. Download the GitHub project library to your local
5. Submit local code to GitHub

Detailed Operation:

1. GitHub website: https://github.com/
After registering your account on the GitHub official website, there is a new button on the right side of the repositories page, click on it to create a code base.


After the creation is complete:

2. Install the GIT client

Http://dlsw.baidu.com/sw-search-sp/soft/4e/30195/Git-2.7.2-32-bit_setup.1457942412.exe

Open git bash after installation
Use the git config command to configure your account mailbox so that you know who submitted it when you commit the code.
Configure your account:
For example, to the user Tom Configuration, his mailbox is [email protected]
git config–global user.name "TOM"
git config–global user.email ' [email protected] '

After the configuration is successful, it is viewed by the same command
Git Config–global user.name
Show TOM
Git Config–global user.email
Show [email protected]

This means that the configuration is successful.

3, the client to establish the Android project
Create a code warehouse under your own project directory.

Right-click on git bash under your project directory,
Enter Git init

After Git init executes successfully, GIT bash will show
Initialized empty Git repository in ... to indicate that the initialization was successful. At this point in your project directory there is a. git folder, which records all of the local git operations. It is a hidden folder.


4. Download the GitHub project library to Local:
Right-click on Git bash in the project directory and enter
git Clone project Address
For example:

This project address is the address of the code base you created on GitHub:

git clone will have a folder named after you under your project, like mine is Redsafe.

Enter this file to see that there are three files inside:

Copy the three files to the project directory, and then delete the folder. This is the end.

5. Submit Local Code
Right-click Git bash in the project directory and enter

git Add. Add all local Files
Git commit-m "First commit"
Git push origin master//submit code to remote server

This time will prompt you to enter your user name and password, input can be submitted.

Submit Complete:

If you submit only one folder, such as only the SRC folder, you can

git add src

Git commit-m is followed by a log description of the commit code

Well, that's OK.

I must vomit trough, originally wanted to intercept a final result diagram, but the network speed is too slow, I turned over the wall to visit GitHub is too slow.
Big Celestial Network blockade is really let a person a little helpless ah!!

Hosting your own code on GitHub

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.