Skip to content
View aswinsekar's full-sized avatar

Organizations

@Coding-Coach
Block or Report

Block or report aswinsekar

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Git script Files Git script Files
    1
    # delete local branches that no longer have remote reference
    2
    git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done
    3
    
                  
    4
    # delete files that are being ignored by git(.gitignore) under a directory
    5
    git clean -xdn # dry run all the files that will list all the gitignore files under the directory