GitHub uses it to submit existing items to github/from GitHub pull to local __git

Source: Internet
Author: User

add an existing item to GitHub

Create a new repository that you can create directly on the GitHub Web site or use the Windows GitHub tool.

Enter GitHub Repository Project

Use Git bash in the GitHub Windows tool to open the project and use the CD command to enter the existing project root directory

Touch README.MD//New description file
git init//build local git management in the current project directory and build a hidden. Git directory
git Add.//Add all files in current directory to index
git commit -M "A-commit"//submit to the local source library with additional submit comments
git Remote add origin https://github.com/chape/test.git//Add to remote project, alias for Origin
git push-u Origin master//push local source Library to GitHub alias Origin remote project, confirm submit

Submit complete to view repository.

Update Code

Cd/d/tvcloud
git Add.
git commit-m "update test"//Detect file changes and attach submit comment
Git push-u origin master//submit modify to Project mainline
GitHub Common Commands
Git push origin master//push local Source library to GitHub
Git pull Origin master/GitHub from pull to local source library
git config--list//view configuration Letter
git status//view project status information
git branch//View Project branch
git checkout-b host//Add a branch named host
git checkout master// Switch to backbone
git merge host//merge branch host to trunk
git branch-d host//Delete branch host

Turn from: http://blog.csdn.net/yishengzhiai005/article/details/51072878

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.