GitHub uploads projects

Source: Internet
Author: User

GitHub uploads Project Learning record on window:

Necessary:

1.GitHub Account

2.Git tool, I was downloaded from csdn git version 2.9, the official website is 2.12, mainly download is too slow, so choose to csdn download.

I. Creating a Warehouse

Then just click Create Repository to build the warehouse.

After the creation, there is a link is very important, this is your warehouse link, is also about to upload the need to use.

Save them first;

Two. Open Gitbash for upload operation

After opening, you must first enter into the project you want to upload (Liunx command OH) I want to upload the project road is E:/eclipce/workspace/webmagictest

OK, in the project, start the command operation of some columns.

1.git Init in the current project to generate Git management, the directory will be more than one. Git folder

2.git Add. (Here's the. is to represent all the files if you want to separate a file can be changed to git add xxx.xx)

3.git commit-m "Mark" commit is a commit,-M is to add the meaning of the note, or do not write, it is best to write because to record what you update each time, so that the control version.

4.git Remote Add Origin https://just saved the warehouse link.

5.git push-u Origin Master Yes, that's the push. Push the project up, there is a push, and of course the pull,pull corresponds to the download project.

At the first push, he will prompt you to enter your account password. Then upload!

Note: When your project is not the same as the project in the GitHub repository! When the push command is executed, it fails.

Will prompt failed to push some ref to Git

Do you remember the Readme file when you first created the library on the page?

That's right because it's not the same as the files in your local project, so it leads to failure!

You will need to download the Readme to your project first.

Git pull--rebase Origin master and then you'll find that you've got one more Readme file in your project.

If you try again, you will succeed.

GitHub uploads projects

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.