Reputation: 255
I want to get most recent 10 remote branches using git. I know I can use git branch -r --sort=-committerdate
to get all remote branches sorted by committerdate. But I want to know, how I can select the most 10 recent remote branches ?
Upvotes: 2
Views: 227
Reputation: 63
You could pipe it to head
:
git branch -r --sort=-committerdate | head -n 10
Upvotes: 2