上传本地代码到github

Posted by thinkwei on April 1, 2016
    
    1.在github的your profile中create a new repository(github账号一定要注册哦)
    
    2.选中要上传的文件夹git bash here(git要安装哦)
    
    3.git init
    
    4.git add .
    
    5.git commit -m "first commit"
    
    6.git remote add origin https://github.com/Githubxinwei/githubxinwei.github.io.git(git remote add origin 你自己的https地址,连接你的github仓库)
    
    7.git push -u origin master(上传项目到github,这里会要求输入github账号和密码,就大功告成了)
    (或者通过phpstorm直接进行提交上传也是可以的,选择git->commit->commit and push)
     
    附带:
        git提交代码的一些基本命令:
        git status
        git add .
        git commit -m "说明"
        git pull
        git push