美文网首页
新建一个项目git初始化文件命令

新建一个项目git初始化文件命令

作者: 轻芒_e | 来源:发表于2019-05-14 22:43 被阅读0次

    …or create a new repository on the command line

    echo "# 111" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin git@github.com:tongluren1/111.git
    git push -u origin master
    

    …or push an existing repository from the command line

    git remote add origin git@github.com:tongluren1/111.git
    git push -u origin master
    

    …or import code from another repository

    You can initialize this repository with code from a Subversion, Mercurial, or TFS project.
    

    git pull 报错: fatal: refusing to merge unrelated histories

    `git pull origin master --allow-unrelated-histories`
    

    后面加上 --allow-unrelated-histories , 把两段不相干的 分支进行强行合并

    相关文章

      网友评论

          本文标题:新建一个项目git初始化文件命令

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