[git] How many lines have I written today?

Neat one-liner that might be interesting to folks. Say you’ve been working in a separate branch for a few hours and you want to know how many new lines of code you cranked out. There you go:

$ git diff parent-branch...topic-branch | grep '^+' | wc -l 390

Pretty neat given how small the command is.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: