Skip to content

Git cheat sheet #10

@rneeft

Description

@rneeft

delete all branches except master with Windows Powershell

git branch | Select-String -NotMatch -Pattern "master" | %{ git branch -D $_.ToString().Trim() }

delete all branches except main with Windows Powershell

git branch | Select-String -NotMatch -Pattern "main" | %{ git branch -D $_.ToString().Trim() }

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