The first experience of GitHub uploading projects

Source: Internet
Author: User

The Git tool was installed very early and didn't have a GitHub account before, and now you're registering for one and want to learn about hosting your own projects and code.

After logging in to your GitHub account, click the green "New repository" to enter a name and comment.

Open the Git tool and use the CD command to enter the directory where the project is located, such as my count project in the D/myeclipse/spring directory, so:

CD D:

CD Myeclipse/srping/count

At this point, navigate to the Count project.

  

Touch readme.md//new readme.md file git init//generate local git management in the current project directory and create a hidden. Git directory git Add. Add all the files in the current directory to the index git commit-m "first commit"//submit to the local source repository and attach the commit comment git remote add Origin https://github.com/chape/test.git Add to remote project, alias Origingit push-u Origin master//push local repository to GitHub alias to Origin remote project, confirm commit

Enter GitHub's account number and password after push.

I got an error after the first push:

  

After the query found that my project count has a readme.md file, the content is empty, and GitHub also has a readme.md, there is content, two readme.md files are not the same.

On the Internet, the readme.md file on GitHub does not exist in the local project, see: http://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.html?st=2 &net_type=&bd_page_type=1&os=0&rst=&[email protected]

Code merge with command git pull--rebase Origin master

Then look at the readme.md in the project, with the same content as on GitHub.

Re-commit Git push-u Origin master to submit the project.

Enter the user name and password for GitHub.

  

From writing objects: The push rate can be seen. A certain amount of time is required.

It's nice to see the last push-completed project on GitHub.

  

Recommended study Materials: http://my.oschina.net/u/855386/blog/353615

  

The first experience of GitHub uploading 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.