Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git_log.md « topics « training « university « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 127fdf4d44a10d80d5b03f96443878ff6c7775a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
comments: false
---

# Git Log

----------

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

1. Change to workspace directory
1. Clone the multi runner projects
1. Change to project dir
1. Search by author
1. Search by date
1. 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"
```