zoukankan      html  css  js  c++  java
  • Can I disable git pull?

    Can I disable git pull?

    I guess the problems you refer to are merge conflicts that may happen if your local branch diverged from the remote. In that case, try setting pull.ff option in git config, like that:

    [pull]
        ff = only
    

    This will tell git to only do fast-forward merges, which are guaranteed to not result in conflicts.

    git config --global pull.ff only  

    https://git-scm.com/docs/git-config

    pull.ff

    pull.ff

    By default, Git does not create an extra merge commit when merging a commit that is a descendant of the current commit. Instead, the tip of the current branch is fast-forwarded. When set to false, this variable tells Git to create an extra merge commit in such a case (equivalent to giving the --no-ff option from the command line). When set to only, only such fast-forward merges are allowed (equivalent to giving the --ff-only option from the command line). This setting overrides merge.ff when pulling.

    merge.ff

    By default, Git does not create an extra merge commit when merging a commit that is a descendant of the current commit. Instead, the tip of the current branch is fast-forwarded. When set to false, this variable tells Git to create an extra merge commit in such a case (equivalent to giving the --no-ff option from the command line). When set to only, only such fast-forward merges are allowed (equivalent to giving the --ff-only option from the command line).

  • 相关阅读:
    C# 利用 Geckofx60 实现下载
    C# 线程 线程池
    C# DateTime 与 String 格式转换
    C# WPF 获取程序路径
    C# 计时器 Timer 介绍
    获取远程图片并把它保存到本地
    php sql 过滤
    PHP如何生成伪静态
    用php获取客户端IP地址的方法
    php过滤危险html代码
  • 原文地址:https://www.cnblogs.com/chucklu/p/12965152.html
Copyright © 2011-2022 走看看