DEV Community

Discussion on: 15 Git Commands You May Not Know

Collapse
 
stecman profile image
Stephen Holdaway • Edited

A companion command to 14 that I use all the time is:

git tag --contains <commit>

It's great for figuring out what versions are affected by a bug once you know the commit, or what version you need to use to have a particular feature/change.

Bonus command is:

git branch --merged master

This one is handy to find old branches that can be safely cleaned up.

Another bonus is:

git describe

Which is an easy way to figure out what the next version should be, or to create a human readable identifier for a commit when packaging a build or writing in a deployment log

Collapse
 
zaiste profile image
Zaiste

Great additions!