Skip to content

Instantly share code, notes, and snippets.

View saitej25's full-sized avatar
🏠
Working from home

Sai TJ Bodanki saitej25

🏠
Working from home
View GitHub Profile
@saitej25
saitej25 / GitDeleteCommands.ps1
Created November 25, 2018 04:11 — forked from cmatskas/GitDeleteCommands.ps1
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch