Use Git like a senior engineer

Git is a powerful tool that feels great to use when you know how to use it.

Jacob Bennett
Level Up Coding
Published in
4 min readNov 15, 2022

--

I’ve used these features of Git for years across teams and projects. I’m still developing opinions around some workflows (like to squash or not) but the core tooling is powerful and flexible (and scriptable!).

Going through Git logs

Git logs are gross to go through out of the box.

git log is basic

Using git log gives you some information. But it’s extremely high-resolution and not usually what you’re looking for.

git log
git log

Let’s be real. These logs aren’t impressing anyone. They are boring. And they’re full of information that you don’t really need right now. You’re trying to get a high-level understanding of what has been going on in your project.

There’s a better way.

git log with more visibility

Using --graph and --format we can quickly get a summary view of git commits in our project.

git log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%an%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %s%C(reset)' --all

--

--

Staff Software Engineer @ Medium • https://jacob.bio • I write about software engineering, product design and development, and leadership in tech.