How to make git diff write to stdout?

后端 未结 3 1987
既然无缘
既然无缘 2021-01-29 20:48

By default git diff prints all +- lines to the stdout however I have a (devian) machine (which I connect through ssh) where git diff leads

3条回答
  •  余生分开走
    2021-01-29 21:36

    You can also simply use cat for any git command if you don't care about the colors.

    So git diff | cat for your case.

    Edit: as pointed out in the comments if you do care about the colors use:

    git diff --color | cat

提交回复
热议问题