Git命令

作者: iWander | 来源:发表于2020-04-27 09:51 被阅读0次

    Git global setup

    git config --global user.name "userName"
    git config --global user.email "userName@xx.com"

    ...或在命令行上创建一个新的存储库

    git clone https://xx.xx.com/userName/superlife.git
    cd superlife-account-page
    touch README.md
    git add README.md
    git commit -m "add README"
    git push -u origin master

    ...或从命令行推送现有空的存储库

    cd existing_folder
    git init
    git remote add origin https://xx.xx.com/userName/superlife.git
    git add .
    git commit -m "Initial commit"
    git push -u origin master

    ...或从命令行推送已有存储库

    cd existing_repo
    git remote add origin https://xx.xx.com/userName/superlife.git
    git push -u origin --all
    git push -u origin --tags

    fatal: refusing to merge unrelated histories

    git pull origin master --allow-unrelated-histories

    记Git报错-refusing to merge unrelated histories

    相关文章

      网友评论

          本文标题:Git命令

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