Using git commits-since (with examples)
Display commits since yesterday
git commits-since yesterday
Motivation
Checking the commits made since yesterday can be useful for reviewing the work done in the past day and staying updated with recent changes.
Explanation
By using the commits-since
command with the argument “yesterday”, Git will display all the commits made since the previous day’s start time until the current time.
Example Output
commit 1234567890abcdef (HEAD -> master)
Author: John Doe <john.doe@example.com>
Date: Mon Mar 15 11:30:45 2022 -0400
Updated README.md
commit abcdef123456789
Author: Jane Smith <jane.smith@example.com>
Date: Mon Mar 15 09:12:27 2022 -0400
Added new feature
commit 7890abcdef123456
Author: John Doe <john.doe@example.com>
Date: Sun Mar 14 17:52:13 2022 -0400
Fix bug in login logic
Display commits since last week
git commits-since last week
Motivation
Reviewing the commits made in the past week can help understand the progress made on a project and identify any changes that may have affected the codebase.
Explanation
When using the commits-since
command with the argument “last week”, Git will display all the commits made since the start of the previous week until the current time.
Example Output
commit 1234567890abcdef (HEAD -> master)
Author: John Doe <john.doe@example.com>
Date: Mon Mar 15 11:30:45 2022 -0400
Updated README.md
commit abcdef123456789
Author: Jane Smith <jane.smith@example.com>
Date: Fri Mar 12 14:23:19 2022 -0400
Added unit tests for API endpoints
commit 7890abcdef123456
Author: John Doe <john.doe@example.com>
Date: Thu Mar 11 09:17:03 2022 -0400
Refactored database queries
Display commits since last month
git commits-since last month
Motivation
Reviewing the commits made in the past month can provide a broader perspective on the project’s development and track the changes made over a longer period of time.
Explanation
Using the commits-since
command with the argument “last month”, Git will display all the commits made since the start of the previous month until the current time.
Example Output
commit 1234567890abcdef (HEAD -> master)
Author: John Doe <john.doe@example.com>
Date: Mon Mar 15 11:30:45 2022 -0400
Updated README.md
commit abcdef123456789
Author: Jane Smith <jane.smith@example.com>
Date: Sun Feb 27 16:42:55 2022 -0400
Implemented user authentication
commit 7890abcdef123456
Author: John Doe <john.doe@example.com>
Date: Fri Feb 18 08:51:29 2022 -0400
Added database migration scripts
Display commits since yesterday 2pm
git commits-since "yesterday 2pm"
Motivation
Sometimes it’s necessary to review the commits made since a specific time during the previous day to focus on recent changes or track progress during a specific timeframe.
Explanation
By providing the argument in the format "yesterday 2pm"
, Git will display all the commits made since that specified time until the current time.
Example Output
commit 1234567890abcdef (HEAD -> master)
Author: John Doe <john.doe@example.com>
Date: Mon Mar 15 11:30:45 2022 -0400
Updated README.md
commit abcdef123456789
Author: Jane Smith <jane.smith@example.com>
Date: Mon Mar 15 09:12:27 2022 -0400
Added new feature