美文网首页
git将本地项目初始化提交到远程仓库

git将本地项目初始化提交到远程仓库

作者: zhujunhua | 来源:发表于2022-03-25 14:39 被阅读0次

    ...create a new repository on the command line

    echo "# t1" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git branch -M main
    git remote add origin git@github.com:zhujunhua2012/t1.git
    git push -u origin main
    

    ...or push an existing repository from the command line

    git remote add origin git@github.com:zhujunhua2012/t1.git
    git branch -M main
    git push -u origin main
    

    PS:
    github中新建一个repository,就会跳出如上的提示步骤。

    相关文章

      网友评论

          本文标题:git将本地项目初始化提交到远程仓库

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