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

Add command to do git cleanup #40

Open
mohitkyadav opened this issue May 12, 2022 · 0 comments
Open

Add command to do git cleanup #40

mohitkyadav opened this issue May 12, 2022 · 0 comments
Assignees

Comments

@mohitkyadav
Copy link
Collaborator

clgitb() {
  # Update remotes tracking data
  git fetch origin
  # Delete the refs to remote branches that no longer exist.
  git remote prune origin
  # Remove local fully merged branches
  git branch -vv | grep "origin/.*: gone]" | awk '{print $1}' | xargs git branch -D
}
@mohitkyadav mohitkyadav self-assigned this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant