DEV Community

Discussion on: Remove all your local git branches but keep main

Collapse
 
ben profile image
Ben Halpern

maybe an alias?

That's reasonable. I have aliases for a lot of my more frequent tasks like this. It's irrational in this case so maybe I should just get over this β€” but I feel a little nervous about making aliases for anything I use infrequently in case I forget what the underlying execution is.

Collapse
 
kenbellows profile image
Ken Bellows • Edited

... in case I forget what the underlying execution is.

...because you currently remember it so well that you wrote a post for your own future reference? πŸ˜›

Collapse
 
goodevilgenius profile image
Dan Jones

I second using an alias. If you forget the alias you set, you can do git config -l to list all config values, including aliases, and just scan through them.

Or, if you remember the alias name, you can do get config --get alias.alias-name to show what it's an alias of.

Thread Thread
 
pandademic profile image
Pandademic • Edited

thanks , I didn't know that... It's useful for more complicated aliases.