Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Add new branch
- ```bash
- git checkout -b [branch_name]
- #add and commit new files
- git push -u origin [branch_name]
- ```
- # Add remote upstream for branch
- ```bash
- git push --set-upstream origin [branch_name]
- ```
- # Delete branch
- ## 1. Delete Local Branch
- ```bash
- #Delete old (merged) branch
- git checkout [other_branch]
- git branch -d [branch_name]
- ```
- ```bash
- #Delete unwanted (un-merged) branch
- git checkout [other_branch]
- git branch -D [branch_name]
- ```
- ## 2. Delete Remote Branch
- ```bash
- git push origin --delete [branch_name]
- ```
Add Comment
Please, Sign In to add comment