Skip to content

Instantly share code, notes, and snippets.

@chenrui333
Created November 3, 2019 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chenrui333/52d98d368fc7f538b17c2e69dc668a48 to your computer and use it in GitHub Desktop.
Save chenrui333/52d98d368fc7f538b17c2e69dc668a48 to your computer and use it in GitHub Desktop.
Clean up multiple git remotes (except rui, upstream and origin)
git remote -v | grep fetch | cut -f 1 | egrep -v '(rui|upstream|origin)' | xargs -I {} git remote remove {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment