updated git-branch.md
- Added branch listing - Added branch deleting
This commit is contained in:
parent
fc41560d71
commit
c706d50ca4
|
@ -34,6 +34,14 @@ git remote prune origin
|
||||||
|
|
||||||
Deletes `origin/*` branches in your local copy. Doesn't affect the remote.
|
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
|
### List merged branches
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -42,6 +50,14 @@ 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 branch forcefully
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git branch -D $branchname
|
||||||
|
```
|
||||||
|
|
||||||
|
Delete a branch irrespective of its merged status.
|
||||||
|
|
||||||
### Delete remote branch
|
### Delete remote branch
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
Loading…
Reference in New Issue