'git remote -v'本地删除不需要的存储库

时间:2018-11-17 20:06:54

标签: git git-bash git-remote

当我在git bash中键入const webpack = require('webpack') module.exports { ... plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jquery: 'jquery', 'window.jQuery': 'jquery', jQuery: 'jquery' }) ] ... } 时,会得到所有存储库URL的列表,问题是它们都已过时,我想删除所有它们。我将如何去做?

2 个答案:

答案 0 :(得分:0)

您可以使用git remote remove按名称删除远程服务器。例如:

$ git remote remove myremote

答案 1 :(得分:0)

很少有删除遥控器的选项

  • 您只需编辑.git/config文件并将其删除
  • git remote remove <remote>
  • git remote rm <remote>
  • git remote prune <remote>

git remote rm

  

rm
  删除名为。
的遥控器。   远程的所有远程跟踪分支和配置设置都将被删除。

git remote prune

  

prune
  删除下方的所有过时的跟踪分支。这些陈旧的分支已从引用的远程存储库中删除,但仍在“ remotes /”中本地可用。   使用--dry-run选项,报告将修剪哪些分支,但实际上不修剪它们。

相关问题