Rudi
Rudi

Reputation: 19940

How to get the full git reflog output when the output is pushed into a pipe

How can I get the output of git reflog into some other programs, without to copy+paste it. When I pipe the output, the branch names suddenly disappear:

$ git --no-pager reflog
8c394ee (HEAD -> master) HEAD@{0}: commit: Bar
cbf7358 HEAD@{1}: commit (initial): Foo

$ git --no-pager reflog | cat
8c394ee HEAD@{0}: commit: Bar
cbf7358 HEAD@{1}: commit (initial): Foo

I just want to be able to grep for specific branch names in the output, which does not work, since git disables the branch names when I try to do it.

Upvotes: 3

Views: 203

Answers (1)

phd
phd

Reputation: 94397

git --no-pager reflog --decorate | cat

Upvotes: 2

Related Questions