美文网首页
本地项目上传到git

本地项目上传到git

作者: anthonywj | 来源:发表于2017-09-28 15:28 被阅读0次
    1. 获取远程库地址
      https://github.com/anthonywj/python_urllib_learn.git

    2. git初始化

    进入项目文件夹,git init初始化目录

    git init
    

    将文件添加到版本库

    git add .
    

    提交文件

    git commit -a -m "first commit"
    
    1. 关联远程库
    git remote add origin https://github.com/anthonywj/python_urllib_learn.git
    
    1. push
    git push -u origin master
    

    注:如果远程不为空需要在关联后执行这一步:

    git pull --rebase origin master
    

    相关文章

      网友评论

          本文标题:本地项目上传到git

          本文链接:https://www.haomeiwen.com/subject/jvzmextx.html