Aleksandar Zoric
Aleksandar Zoric

Reputation: 1483

Show all branches merged to Master between 2 dates - Git

With git log I can use --since and --until to show data between 2 dates. And with git branch -r I can extract all the remote branches.

How would I show all branches merged to master between 2 dates?

git log --since "DEC 1 2019" --until "JAN 1 2020" --pretty=format:"%h %an %ad"

This returns all commits between 2 dates but I'd like to return the branch names between these 2 dates that were merged to master?

Thanks in advance.

Upvotes: 2

Views: 1861

Answers (1)

mnestorov
mnestorov

Reputation: 4494

You can try with the --merges and the --date flags for git log. So it will look like:

git log --merges --date=iso --since "DEC 1 2019" --until "JAN 1 2020" --pretty=format:"%h %an %ad"

Upvotes: 5

Related Questions