Skip to content

Commit c706d50

Browse files
authored
updated git-branch.md
- Added branch listing - Added branch deleting
1 parent fc41560 commit c706d50

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

git-branch.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ git remote prune origin
3434

3535
Deletes `origin/*` branches in your local copy. Doesn't affect the remote.
3636

37+
### List existing branches
38+
39+
```bash
40+
git branch --list
41+
```
42+
43+
Existing branches are listed. Current branch will be highlighted with an asterisk.
44+
3745
### List merged branches
3846

3947
```bash
@@ -42,6 +50,14 @@ git branch -a --merged
4250

4351
List outdated branches that have been merged into the current one.
4452

53+
### Delete branch forcefully
54+
55+
```bash
56+
git branch -D $branchname
57+
```
58+
59+
Delete a branch irrespective of its merged status.
60+
4561
### Delete remote branch
4662

4763
```bash

0 commit comments

Comments
 (0)