Let say there are 3 branches: A, B, and C.
A was merged 2 days ago.
B was merged 3 days ago.
I would like to get the information below from git history:
Git History dated 1 weeks ago
So, it would only show A, and B.
The retrieved information should only contains:
a. The revision log when it was merged. For example, revision 45edfe, with the auto comment by GIT like "Merge branch XXXX".
b. Branch Name if possible.
c. Merged Date
Thanks
You can use git log
with the --after
and --merges
switches like this:
git log --after="2015-5-23" --merges
The current date as of writing this answer is 29 May, 2015. The above command will get all merge commits which have happened in the last 7 days (inclusive of 2015-5-23).
A typical git log
entry looks like this:
$ git log
commit ca82a6dff817ec66f44342007202690a93763949
Author: Hatjhie <[email protected]>
Date: Fri May 29 21:52:11 2008 -0700
Added new UI feature
You typically will run git log
for a given branch, and the revision log and branch name are implicitly included.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With