Guest User

Untitled

a guest
Dec 17th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. ## Pushing to a remote branch with different name
  2.  
  3. ```bash
  4. git push origin local-name:remote-name
  5. ```
  6.  
  7. ## Delete all local branches except some
  8. Test it first:
  9. 1. Change master by the name of the branch you want to keep, the branches showing will be eliminated
  10. ```bash
  11. git branch | grep -v "master"
  12. ```
  13.  
  14. 2. Eliminate branches with xargs
  15. ```
  16. git branch | grep -v "master" | xargs git branch -D
  17. ```
Add Comment
Please, Sign In to add comment