'how to delete multiple branches in boh local and remote once by GIT
I used to delete multiple branches in my local, but how can I delete the same branches in romote?
git branch | grep "<pattern>" | xargs git branch -D
Solution 1:[1]
Answer from How do I delete a Git branch locally and remotely?
To delete remote branchs since Git 1.7.0 version, you can do:git push <remote_name> --delete <remote_branch_name>
For example if there is in origin a branch called experiment the command will be:git push origin --delete experiment
Note: Use this command with caution, so you have to perform each deletion at a time.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
