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

[Feature Request] Purge branches/tags in destination repository #23

Open
Frederick888 opened this issue Dec 7, 2020 · 3 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Frederick888
Copy link

For example, a user may want to push to GitLab simply to trigger a around of testing in GitLab CI, in which case it'd be nice if it's possible to clean up remote branches/tags as well so that users don't need to do this manually.

@wei
Copy link
Owner

wei commented Dec 7, 2020

I believe you're asking for one-off user triggered branch deletion? I don't think that's a use-case git-sync will support at this time. You can look into actions/checkout which lets you checkout gitlab repo and run git commands to delete branches.

@wei wei closed this as completed Dec 7, 2020
@Frederick888
Copy link
Author

@wei Sorry I may not have put this clearly.

For example, in the source repo I've got master and feature branches. After merging feature into master, I often delete the feature branch in both local and source repos. But after pushing it to source repo, git-sync doesn't delete the feature branch in destination repo. Over the time I get more and more stale branches in the destination repo.

So I wonder if it's possible to trigger git-sync on delete as well and purge those branches/tags? Of course I can do this using actions/checkout and Git commands but imho this feature sounds like a good complement to this project.

@wei
Copy link
Owner

wei commented Dec 7, 2020

Ahh, I see. Thanks for explaining that!!

I agree adding an option to force sync all refs while deleting all the missing refs would be a good feature to have (to keep repos in both places clean). Reopened and PR welcome!!

@wei wei reopened this Dec 7, 2020
@wei wei added enhancement New feature or request help wanted Extra attention is needed labels Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants