re: Delete a Git branch both locally and remotely [Shell aliases + functions] #OneDevMinute VIEW POST

VIEW FULL DISCUSSION
 

Nice tip!

Any reason for using force to delete local branch though (git branch -D "$1", the d is majuscule)?

I think it'd be safer to use git branch -d "$1"

 

Thanks.

I think that's because it avoids the message of the branch not being merged?

 

Yes, so that means you lose your code (hence the force).

code of conduct - report abuse