summaryrefslogtreecommitdiff
path: root/doc/university/training/topics/git_log.md
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2019-06-11 08:38:59 +0000
committerAchilleas Pipinellis <axil@gitlab.com>2019-06-11 08:38:59 +0000
commitc403fdd7c04324f292d58d5b9bb63574776dc431 (patch)
treeb9d155158a13eb00547a9d1a6f4827650ea3bcd5 /doc/university/training/topics/git_log.md
parent6050b348d72a82bd2373d45fbd33ac693cd80d42 (diff)
downloadgitlab-ce-c403fdd7c04324f292d58d5b9bb63574776dc431.tar.gz
SSoT audit fixes for GitLab U topics
Also improves the markdown in that section.
Diffstat (limited to 'doc/university/training/topics/git_log.md')
-rw-r--r--doc/university/training/topics/git_log.md20
1 files changed, 6 insertions, 14 deletions
diff --git a/doc/university/training/topics/git_log.md b/doc/university/training/topics/git_log.md
index 763ef802a04..11addcd3ee1 100644
--- a/doc/university/training/topics/git_log.md
+++ b/doc/university/training/topics/git_log.md
@@ -4,44 +4,38 @@ comments: false
# Git Log
-----------
-
Git log lists commit history. It allows searching and filtering.
- Initiate log:
- ```
+ ```sh
git log
```
- Retrieve set number of records:
- ```
+ ```sh
git log -n 2
```
- Search commits by author. Allows user name or a regular expression.
- ```
+ ```sh
git log --author="user_name"
```
-----------
-
- Search by comment message:
- ```
+ ```sh
git log --grep="<pattern>"
```
- Search by date:
- ```
+ ```sh
git log --since=1.month.ago --until=3.weeks.ago
```
-----------
-
## Git Log Workflow
1. Change to workspace directory
@@ -51,11 +45,9 @@ Git log lists commit history. It allows searching and filtering.
1. Search by date
1. Combine
-----------
-
## Commands
-```
+```sh
cd ~/workspace
git clone git@gitlab.com:gitlab-org/gitlab-runner.git
cd gitlab-runner