Answers for "git delete branch you are on"

37

git delete branch

## git version 2.25.1

## Deleting local branches
git branch -d localBranchName
## Deleting remote branches
git push origin --delete remoteBranchName

## Deleting both a local and a remote branch
## They are completely separate objects in Git. But
git branch -d localBranchName && git push origin --delete remoteBranchName
Posted by: Guest on June-28-2020
0

How to Create Branch Delete and View Branch

// View Current Branch status
git status

// List All Branch
git branch

// Create Branch
git branch <branch>

// Delete Branch (safe delete use -D to force delete)
git branch -d <branch>

// Deleting From remote
git push origin --delete crazy-experiment

Rename the current branch to <branch>.
git branch -a
Posted by: Guest on April-23-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language