Git merge ignore spaces [duplicate]

混江龙づ霸主 提交于 2019-12-09 02:46:41

问题


Possible Duplicate:
git whitespace woes

How can I setup get to not report conflicts purely due to whitespace on a merge, like the following ?

<<<<<<< HEAD
    open RESDBFILE, "< $this_day_result_file_";
    while ( my $resdbline_ = <RESDBFILE> )
    {
        my @rwords_ = split ' ', $resdbline_;
        if ( exists $uncaliberated_strategies_{$rwords_[0]} )
        { # if this strategy_filename_base was there in @strategy_filevec_
        delete $uncaliberated_strategies_{$rwords_[0]};
        }
    }
    close RESDBFILE;
=======
      open RESDBFILE, "< $this_day_result_file_";
      while ( my $resdbline_ = <RESDBFILE> )
      {
    my @rwords_ = split ' ', $resdbline_;
    if ( exists $uncaliberated_strategies_{$rwords_[0]} )
    { # if this strategy_filename_base was there in @strategy_filevec_
        delete $uncaliberated_strategies_{$rwords_[0]};
    }
      }
      close RESDBFILE;
>>>>>>> origin/stable

回答1:


Try:

$ git merge -s ignore-all-space

For more details:

$ git help merge
/whitespace



回答2:


You can try setting the core.whitespace config to see if that helps.



来源:https://stackoverflow.com/questions/6956631/git-merge-ignore-spaces

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!