Two minutes learn how to GitHub managed code _ related tips

Source: Internet
Author: User
Tags commit

This blog for not git children's shoes, the great God can bypass, the wrong place thank you;

About GitHub Strong here is not the explanation, know GitHub also have some time, but have been suffering from not use.

This article describes how to host the project code to the above; If you have not registered GitHub account please go to https://github.com/to register

If you have registered your GitHub account, you have installed GitHub on your computer and have not uploaded the code.


1. Open the browser login to your GitHub account, creat a new repo as shown:



2. Then jump to the next page, fill in Repository name, such as: TEST, in Add. Gitgore a choice according to the language you use, the other default, and then creat repository


Then GitHub automatically generates a simple command line for you to host your project, HTTP, SSH, and the remote warehouse address you created for your connection.



3. Open Xcode to create a project, such as the project name I created Testdemo, then open the terminal, enter the Testdemo folder, and enter the creat a new repository on the command line prompt


Project code has been managed;

When you enter GIT push-u Origin master on the terminal, you will come out username: and password This represents your GitHub account and password, we enter the account and password has been shown as blank, which is to prevent user privacy disclosure without displaying any information, It's not computer-computer animation.


4. Then in the repositories of your GitHub account you will find the Testdemo code project you just replaced on the terminal: Figure



Opening test,https://github.com/xfzldxf/test.git is a link to the code engineering that allows you to clone the contents of the project to local



Explain the command entered below:

1 Touch readme.md file is the introduction of engineering code, similar to the use of manual

2 git init Initializes a local git repository and generates a hidden. Git directory (the hidden. Git directory can be viewed using the LS-AF command)

3 git add readme.md the readme.md file to the warehouse

4 git commit-m "one commit" execution submission instructions, in Gitz this is mandatory

5 git Remote Add origin https://github.com/XFZLDXF/TEST.git add local warehouse origin and specify the address

6 Git push Origin master pushes the local warehouse to the remote designated Master branch

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.