Skip to content

Add command to do git cleanup #40

@mohitkyadav

Description

@mohitkyadav
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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions