GIT简单使用

作者: 1989s | 来源:发表于2016-04-27 15:55 被阅读5次

    本地配置全局git

    git config --global user.name "username"
    git config --global user.email "user email"
    

    创建本地仓库提交到git上

    该针对本地没有存在的项目。

    mkdir git-osc  
    cd git-osc  
    git init  
    touch README.md  
    git add  README.md  
    git commit -m 'first commit'
    git remote add origin https://git.oschina.net/oschina/git-osc.git  
    git push -u origin master
    

    提交本地已存在的项目到git

    针对本地已经存在项目,想把项目提交到git仓库。

    cd 项目目录
    git remote add origin https://git.oschina.net/oschina/git-osc.git
    git push -u origin master
    

    最后大赞简书markdown编辑器棒棒的!!!

    相关文章

      网友评论

        本文标题:GIT简单使用

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