Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Pushing to a remote branch with different name
- ```bash
- git push origin local-name:remote-name
- ```
- ## Delete all local branches except some
- Test it first:
- 1. Change master by the name of the branch you want to keep, the branches showing will be eliminated
- ```bash
- git branch | grep -v "master"
- ```
- 2. Eliminate branches with xargs
- ```
- git branch | grep -v "master" | xargs git branch -D
- ```
Add Comment
Please, Sign In to add comment