Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic check for leaf #7

Closed
BioQwer opened this issue Apr 19, 2016 · 5 comments
Closed

Basic check for leaf #7

BioQwer opened this issue Apr 19, 2016 · 5 comments
Assignees
Milestone

Comments

@BioQwer
Copy link

BioQwer commented Apr 19, 2016

Hello @frost-nzcr4 .
For example, my local repo it's fork of more popular repo. My repo has't fork.
I want to get all forks of more popular repo that has changes but not merged in to popular repo.
Can you add this feature?

@BioQwer
Copy link
Author

BioQwer commented Apr 19, 2016

I find GitHub method to find forks with some changes, but them secure.
Method don't work where large forks count, but for little repo is good.
https://github.com/:user/:repo/network/meta

image

@frost-nzcr4 frost-nzcr4 added this to the 0.6.0 milestone Apr 23, 2016
@frost-nzcr4
Copy link
Owner

frost-nzcr4 commented Apr 24, 2016

Did you try command to remove all merged forks git branch -r --merged | grep -v -e "\(origin\|upstream\|BioQwer\)/" | xargs -n 1 git branch -r -d described in #1?

The command is basically ok, until some user1 has made changes to upstream and other user2 forks from this one, then git thinks that they both made the changes and both forks will still exist, but only fork of user1's should.

To prevent this kind of duplicates:

  • command to remove all merged forks should run on every branch automatically, or
  • Commits API can be used

I think it's a task for git rather than github.

@BioQwer
Copy link
Author

BioQwer commented Apr 24, 2016

Before you say don't.
Thanks you it't cool clean up. I can add as default behavior after find all forks.
How i can clean up unmerged duplicates branches?

@frost-nzcr4
Copy link
Owner

frost-nzcr4 commented Apr 24, 2016

Try this script:

for BRANCH in $( git branch -r --no-color | cut -d" " -f3 ); do
    git checkout "$BRANCH"
    git branch -r --merged | grep -v -e "\(origin\|upstream\|BioQwer\)/" | xargs -n 1 git branch -r -d
done

all duplicates should be removed.

@BioQwer
Copy link
Author

BioQwer commented Apr 24, 2016

All ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants