Skip to content

Commit

Permalink
Added workaround for duplicate branches. Closes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
frost-nzcr4 committed Apr 24, 2016
1 parent 8359897 commit f80157c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ pip install -r requirements-prod.txt
python /path/to/find_forks --user=user --repo=repo
```


2. Use as module:

```python
Expand All @@ -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:
Expand Down

0 comments on commit f80157c

Please sign in to comment.