new

Try Stack Overflow for Business

Our new business plan for private Q&A; offers single sign-on and advanced features. Get started by May 31 for 2 months free.

Learn more
4 added 4 characters in body
source | link

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name<branch_name> 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name<branch_name>

Delete remotely:

There are two options:

git push origin :branchname  

git push origin --delete branchname 

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname  

git push origin --delete branchname 

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d <branch_name> 

To delete a branch forcibly, use -D instead of -d.

git branch -D <branch_name>

Delete remotely:

There are two options:

git push origin :branchname  

git push origin --delete branchname 

I would suggest you use the 2nd way as it is more intuitive.

3 added 9 characters in body
source | link

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname

git push origin --delete branchname

git push origin :branchname  

git push origin --delete branchname 

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname

git push origin --delete branchname

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname  

git push origin --delete branchname 

I would suggest you use the 2nd way as it is more intuitive.

2 deleted 1 character in body
source | link

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname

git push origin --delete :branchname

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname

git push origin --delete :branchname

I would suggest you use the 2nd way as it is more intuitive.

Delete locally:

To delete a local branch, you can use:

git branch -d branch_name 

To delete a branch forcibly, use -D instead of -d.

git branch -D branch_name

Delete remotely:

There are two options:

git push origin :branchname

git push origin --delete branchname

I would suggest you use the 2nd way as it is more intuitive.

1
source | link