Skip to content

Commit e1ba597

Browse files
committed
Add alias git drb
Add alias git drb to delete the remote brnach with the same name as the current branch from the remote origin. See https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#_delete_branches
1 parent 94c988f commit e1ba597

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ Alias for `git branch --delete @{-1}` to delete the previous branch.
88

99
See [Git Previous Branch](https://salferrarello.com/git-previous-branch/).
1010

11+
### `git drb`
12+
13+
Alias for `git push origin --delete $(git branch --show-current)` to delete the remote branch with the same name as the current branch from the remote **origin**.
14+
15+
See [Deleting Remote Branches](https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches#_delete_branches).
16+
1117
### `git lg`
1218

1319
Decorated version of `git log --oneline --graph`.

gitconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[alias]
22
d-b = branch -d @{-1}
3+
drb = !git push origin --delete $(git branch --show-current)
34
lg = log --color --graph --date=format:'%Y-%m-%d %H:%M:%S' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'
45
open-pr-github = "!f() { \
56
: git branch ; \

0 commit comments

Comments
 (0)