Git

作者: RockStar_阿俊 | 来源:发表于2018-08-28 10:29 被阅读0次

    Git global setup

    git config --global user.name "陈俊"
    git config --global user.email "271200229@qq.com"
    

    Create a new repository

    git clone https://gitlab.com/JceJun/Demo.git
    cd Demo
    touch README.md
    git add README.md </pre>
    git commit -m "add README"
    git push -u origin master 
    

    Existing folder

    cd existing_folder
    git init
    git remote add origin https://gitlab.com/JceJun/Demo.git
    git add .
    git commit -m "Initial commit"
    git push -u origin master 
    

    Existing Git repository

    cd existing_repo
    git remote rename origin old-origin
    git remote add origin https://gitlab.com/JceJun/Demo.git
    git push -u origin --all
    git push -u origin --tags 
    

    本地创建Demo

    cd 文件夹
    git init
    git add .
    git commit -am '123' gitLab创建Demo
    git remote add
    git push
    git push --set-upstream Demo master
    拉取
    git pull Demo master git pull origin master 是url的别名
    是分⽀支
    

    相关文章

      网友评论

          本文标题:Git

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