mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2026-08-15 13:34:53 +02:00
updated git-branch.md
- Added branch listing - Added branch deleting
This commit is contained in:
committed by
GitHub
parent
fc41560d71
commit
c706d50ca4
@@ -34,6 +34,14 @@ git remote prune origin
|
||||
|
||||
Deletes `origin/*` branches in your local copy. Doesn't affect the remote.
|
||||
|
||||
### List existing branches
|
||||
|
||||
```bash
|
||||
git branch --list
|
||||
```
|
||||
|
||||
Existing branches are listed. Current branch will be highlighted with an asterisk.
|
||||
|
||||
### List merged branches
|
||||
|
||||
```bash
|
||||
@@ -42,6 +50,14 @@ git branch -a --merged
|
||||
|
||||
List outdated branches that have been merged into the current one.
|
||||
|
||||
### Delete branch forcefully
|
||||
|
||||
```bash
|
||||
git branch -D $branchname
|
||||
```
|
||||
|
||||
Delete a branch irrespective of its merged status.
|
||||
|
||||
### Delete remote branch
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user