安装 install

$ brew install graphicsmagick

https://formulae.brew.sh/formula/graphicsmagick

执行命令 gm

fatal: not a git repository (or any of the parent directories): .git

执行 which gm 命令 提示:gm是git merge的别名

gm: aliased to git merge

执行 unalias gm 命令,在执行 which gm

/usr/local/bin/gm

再执行 gm

GraphicsMagick 1.3.29 2018-04-29 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2018 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Usage: gm command [options ...]

Where commands include: 
      batch - issue multiple commands in interactive or batch mode
  benchmark - benchmark one of the other commands
    compare - compare two images
  composite - composite images together
    conjure - execute a Magick Scripting Language (MSL) XML script
    convert - convert an image or sequence of images
       help - obtain usage message for named command
   identify - describe an image or image sequence
    mogrify - transform an image or sequence of images
    montage - create a composite image (in a grid) from separate images
       time - time one of the other commands
    version - obtain release version