美文网首页
git基本使用

git基本使用

作者: 圣地亚哥僵尸 | 来源:发表于2019-03-25 17:51 被阅读0次

    首先要在本地生成ssh,然后添加到github

    在windows下查看[c盘->用户->自己的用户名->.ssh]下是否有id_rsa、id_rsa.pub文件,如果没有需要手动生成。
    打开git bash,在控制台中输入以下命令。
    $ ssh-keygen -t rsa -C "youremail@example.com"
    

    在线上创建仓库后复制git地址clone到本地

    git clone 
    

    cd进入目录查看git状态

    git status
    

    添加和提交本地

    git add . 
    git commit -m `msg`
    

    推送远程master分支

    git push origin master
    

    相关文章

      网友评论

          本文标题:git基本使用

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