From c403fdd7c04324f292d58d5b9bb63574776dc431 Mon Sep 17 00:00:00 2001 From: Evan Read Date: Tue, 11 Jun 2019 08:38:59 +0000 Subject: SSoT audit fixes for GitLab U topics Also improves the markdown in that section. --- doc/university/training/topics/git_log.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'doc/university/training/topics/git_log.md') 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="" ``` - 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 -- cgit v1.2.1