1.1 KiB
1.1 KiB
stage | group | info | comments |
---|---|---|---|
Create | Source Code | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments | false |
Git Log (FREE)
Git log lists commit history. It allows searching and filtering.
-
Initiate log:
git log
-
Retrieve set number of records:
git log -n 2
-
Search commits by author. Allows user name or a regular expression.
git log --author="user_name"
-
Search by comment message:
git log --grep="<pattern>"
-
Search by date:
git log --since=1.month.ago --until=3.weeks.ago
Git Log Workflow
- Change to workspace directory
- Clone the multi runner projects
- Change to project dir
- Search by author
- Search by date
- Combine
Commands
cd ~/workspace
git clone git@gitlab.com:gitlab-org/gitlab-runner.git
cd gitlab-runner
git log --author="Travis"
git log --since=1.month.ago --until=3.weeks.ago
git log --since=1.month.ago --until=1.day.ago --author="Travis"