Guest User

Untitled

a guest
Feb 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # Add new branch
  2. ```bash
  3. git checkout -b [branch_name]
  4. #add and commit new files
  5. git push -u origin [branch_name]
  6. ```
  7.  
  8. # Add remote upstream for branch
  9. ```bash
  10. git push --set-upstream origin [branch_name]
  11. ```
  12.  
  13. # Delete branch
  14.  
  15. ## 1. Delete Local Branch
  16. ```bash
  17. #Delete old (merged) branch
  18. git checkout [other_branch]
  19. git branch -d [branch_name]
  20. ```
  21.  
  22. ```bash
  23. #Delete unwanted (un-merged) branch
  24. git checkout [other_branch]
  25. git branch -D [branch_name]
  26. ```
  27.  
  28. ## 2. Delete Remote Branch
  29. ```bash
  30. git push origin --delete [branch_name]
  31. ```
Add Comment
Please, Sign In to add comment