美文网首页
git 仓库初始化

git 仓库初始化

作者: superrick | 来源:发表于2022-08-08 14:48 被阅读0次

    创建本地仓库

    $ mkdir test
    $ cd test
    $ git init 
    $ touch README.md
    $ git add README.md
    $ git commit -m "first commit"
    

    http push 方式

    $ git remote add origin http://XXXX.com/XXX/test.git
    $ git push -u origin "master"
    

    ssh push 方式

    1. ssh rsa 秘钥生成
    2. 配置公钥
    3. 推送
    $ git remote add origin git@XXXX.com/XXX/test.git
    $ git push -u origin "master"

    相关文章

      网友评论

          本文标题:git 仓库初始化

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