Automatic prune with Git fetch or pull

后端 未结 3 1848
我在风中等你
我在风中等你 2020-11-27 09:29

If someone deleted a remote branch because the work is over and I don\'t know, I won\'t do a git fetch --prune and eventually I will push back the deleted branc

3条回答
  •  生来不讨喜
    2020-11-27 10:06

    If you want to always prune when you fetch, I can suggest to use Aliases.

    Just type git config -e to open your editor and change the configuration for a specific project and add a section like

    [alias]
    pfetch = fetch --prune   
    

    the when you fetch with git pfetch the prune will be done automatically.

提交回复
热议问题