Git diff - ignore reorder
问题 git diff numbers diff --git a/numbers b/numbers index 5f5fbe7..d184fef 100644 --- a/numbers +++ b/numbers @@ -1,3 +1,3 @@ -1 +4 +3 2 -3 Number 3 is repeated but the order is changed. Any way to ignore the reorder in git or any grep solution? I want the result of only added and deleted numbers, not reordering of the same numbers Any help? 回答1: The diffing tools are usually implemented in terms of the Myers' diff algorithm. There isn't much that you can do to control the behaviour of GNU/git