DEV Community

Discussion on: 51 git commands that you'll ever need to get started with Git 🔥

Collapse
 
vinayhegde1990 profile image
Vinay Hegde • Edited

Good cheatsheet of commands but one can accidentally delete the live branch if it's not named master but main or production.

An easy way is to exclude it like:

egrep -iv '(master|main|production)'
Enter fullscreen mode Exit fullscreen mode

In the cleanup local branches section