Update git-branch.md

to delete a remote branch, you have to add the parameter --delete

https://www.educative.io/edpresso/how-to-delete-remote-branches-in-git
This commit is contained in:
Filip Vanden Eynde 2020-01-07 10:55:21 +01:00 committed by GitHub
parent bc51528f1a
commit f2844aee9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -56,12 +56,17 @@ List outdated branches that have been merged into the current one.
git branch -D $branchname
```
Delete a branch irrespective of its merged status.
```bash
git branch -d $branchname
```
> Note: You can also use the -D flag which is synonymous with --delete --force instead of -d. This will delete the branch regardless of its merge status.
> Delete a branch irrespective of its merged status.
### Delete remote branch
```bash
git push origin :$branchname
git push origin --delete :$branchname
```
Works for tags, too!