GitFAQ中文网

    • 下载Git
    • Git配方
      • 什么是 Git?
      • Git简易指南
      • Git创建代码仓库
      • Git保存更改
      • Git检查仓库状态
      • Git检出之前的提交
      • Git回滚错误的修改
      • Git重写项目历史
      • Git保持同步
      • Git创建Pull Request
      • Git使用分支
      • Git常见工作流比较
      • Git图解
      • Git代码合并选Merge还是Rebase
      • Git代码回滚选Reset、Checkout还是Revert
      • Git log高级用法
      • Git 钩子:自定义你的工作流
      • Git提交引用和引用日志
    • GitFS中文手册
      • 安装和使用GitFS完整示例
      • GitFS参数说明
    • VPS
    • blog
    • autohotkey
    • dotbbq
    • fastcopy
    • fcitx
    • freeotp
    • qgis

    Fetch

    Git中fetch和pull有什么不同之处?

    Calendar 七月 24, 2024
    Git, Fetch, Pull

    git pull [remote] [branch] 等同于如下操作

    ## 从远程仓库获取最新修改
    git fetch [remote] [branch]  
    ## 合并最新修改
    git merge [remote][/branch]

    git pull --rebase [remote] [branch]等同于如下操作

    ## 从远程仓库获取最新修改
    git fetch [remote] [branch]
    git rebase [remote][/branch]

    via https://gitfaq.org/1/01/what-is-the-difference-between-fetch-and-pull/

    • Categories
      • Tags
        • Git 35
        • Gitfaq 2
        • Git工作流 1
        • 工作流 1
        • Git常见问题 1
        • 版本控制 1
        • Github 1
        • Github Release 1
        • Gitscm 3
        • Windows 2
        • Remote 1
        • Set-Url 1
        • Git Server 1
        • SSH 2
        • Git Config 1
        • Zsh 1
        • Zshcontrib 1
        • Binary File 1
        • 二进制文件 1
        • BOM 1
        • Gitattributes 1
        • Fetch 1
        • Pull 1
        • Portion 1
        • Proxy 1
        • Writing Objects 1
        • Archive 1