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