Merge pull request #1319 from filipve1994/patch-1

Update git-branch.md
This commit is contained in:
Rico Sta. Cruz 2020-02-13 21:52:45 +11:00 committed by GitHub
commit 9490cf3adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -64,12 +64,17 @@ Deletes the branch only if the changes have been pushed and merged with remote.
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!