I've repository with hundreds of branches and I'd like to run git show
only for these which have been recently fetched or updated as shown by git fetch
, e.g.
$ git fetch tester
From repo:Foo/Bar
* [new branch] Foo -> origin/Foo
a7e70a8..a9d7805 Bar -> origin/Bar
+ b673629...293dc64 Baz -> origin/Baz (forced update)
+ 345850e...b3646a3 Qux -> origin/Qux (forced update)
So I'd like to end up with the command like:
git show origin/Foo origin/Bar origin/Baz origin/Qux
which will show me the differences between these recent fetched branches and their parents commit(s).
How this can be achieved?
I've tried git show FETCH_HEAD
, but it shows me only one branch along with the warning that refname 'FETCH_HEAD' is ambiguous.
And git show $(git branch -r --sort=authordate | head)
shows me much older branches, secondly the command breaks on lines with ->
, so it doesn't work either.