Ruby, Rails, Git再入門 git fetch –pruneをデフォルトにする方法

昨日git fetch –pruneについて調べたが、毎回毎回git fetch –pruneとコマンドを打つのは面倒だし、間違ってしまう1


git fetch –help

$ git fetch --help
       -p, --prune
           After fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are
           fetched only because of the default tag auto-following or due to a --tags option. However, if tags are fetched due to an explicit
           refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the --mirror option),
           then they are also subject to pruning.


git config –help

$ git config --help
           If true, fetch will automatically behave as if the --prune option was given on the command line. See also remote..prune.


$ git config --global fetch.prune true

  1. ってかもう間違った。