git init
git remote add origin https://github.com/zxy1994/zxyJsDemo.git
touch .gitignore #创建.gitignore文件
git add .git commit -m "first commit"
git add .
git commit -m "first commit"
git push -u origin master
利用git将项目上传到github
原文:http://www.cnblogs.com/zeng1994/p/7397590.html