diff --git a/README.md b/README.md index accb618..e1877b1 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,6 @@ pip install -r requirements-prod.txt python /path/to/find_forks --user=user --repo=repo ``` - 2. Use as module: ```python @@ -87,6 +86,17 @@ pip install -r requirements-prod.txt find_forks() ``` +### How to remove duplicate branches + +Current workaround to remove duplicates: + +```ShellSession +for BRANCH in $( git branch -r --no-color | cut -d" " -f3 ); do + git checkout "$BRANCH" + git branch -r --merged --no-color | grep -v -e "\(origin\|upstream\|your\-github\-name\)/" | xargs -n 1 git branch -r -d +done +``` + ### How to fetch large repo When repo has over 6000 forks one may face a github's API limit. To continue fetching use `start-page` option: