Git and GitHub---novice upload experience (fast learning)

Source: Internet
Author: User

1. First download http://www.git-scm.com/download/Git from the official website, according to your operating system to select the appropriate version to download. It is downloaded automatically after the point is entered. Then follow the prompts to proceed to the next step, install the path to find a suitable place for yourself. After the installation is complete, there are two can be used by us, Gitbash is in the form of command line, GUI is a graphical interface, both of which I suggest or the first, because looking to increase the force lattice, the other speed is also fast. It's like this when it's open------------------------------

2. Then next is GitHub, specific I do not say, need to search for themselves, I only say how to operate. Register your GitHub account on the website https://github.com/, and remember your username and password.

3. I'm going to go to the subject now and I want to upload a file containing HTML,CSS,JS and 4 images to GitHub.

(1) Open GitHub, click and create your repository.

(2) Project name, comments

(3)

4. OK, the following into the gitbash inside it,, there are mainly three commands, the first git clone http://~~~~~ (that is, the above copy of the URL, paste it on the line) after the execution, your folder is more than a alerts folder.

(1) Enter your account number and email address to apply for GitHub username and email

git config--global user.name "name"

git config--global user.email "Mailbox"

You can use git config--global user.name or git config–global user.email to view settings separately

Or use Git config–list to see all the settings.

(2) Next, move the file you want to upload to the system new folder, here is the Alerts folder

。 All right. We enter the command, git status (various commands to see this article http://www.cnblogs.com/mengdd/p/4153773.html, if there is infringement, please contact, the first time to delete this link) to see, nothing .... Why?

(3). Because of the lack of added commands, such as I want to add alert.html git add alert.html, also I want to add 0.png this picture, can, again, git add 0.png

(4) We found that the number of small can also, if a project has dozens of to hundreds of files, so add not tired, so there is a simple operation of the command, the equivalent of a key to add, that is, git Add. (Note the add space, and then add a.) , tap Enter, and then enter GIT status to see the effect. That's all in.

(5) It's almost over. We also need to add a note to each, where I add git commit–a–m "abc" directly. Git is divided into three zones, workspaces, staging area, and version areas.  Add is to add the file from the workspace to the staging area, and commit is to add the file from staging area to the version area. Git commit–a–m "abc" means the shorthand form from the workspace to the staging area to the version area and annotations.

(6) OK, the last step, git push, done!

(7) Okay, it's done! Effect: Https://github.com/Armandyang/alerts

5. This section is a quick start, there are a lot of things just a simple mention, want to skillfully use, but also need our in-depth research! Practice is always more useful than daydreaming!

Git and GitHub---novice upload experience (fast learning)

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.