Update git-branch.md

To delete a branch already pushed and merged with remote, use `git branch -d $branchname`
This commit is contained in:
Rahul 2020-01-17 12:51:18 +05:30 committed by GitHub
parent bc51528f1a
commit fd9ccf25d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,12 @@ git branch -a --merged
List outdated branches that have been merged into the current one. List outdated branches that have been merged into the current one.
### Delete a local branch
```bash
git branch -d $branchname
```
Deletes the branch only if the changes have been pushed and merged with remote
### Delete branch forcefully ### Delete branch forcefully
```bash ```bash