美文网首页
github常用方法

github常用方法

作者: JalorOo | 来源:发表于2021-07-05 16:55 被阅读0次

正常流程

  1. 创建仓库
    git init

2.添加更新
git add .

  1. 为更新提供注释
    git commit -m"注释内容"

  2. 获得远程仓库最新版本
    git pull origin master,其中[origin master]为可选,一定要养成好习惯,在push之前先pull一下

  3. 提交更新到远程仓库
    git push origin master,其中[origin master]为可选

有些突发的可能用到的语句

  1. 添加远程仓库
    git remote add origin git@github.com:用户名/仓库名.git

  2. 修改远程仓库地址
    git remote set-url origin git@github.com:用户名/仓库名.git

相关文章

网友评论

      本文标题:github常用方法

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