diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 03:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-14 03:08:27 +0300 |
commit | b7d58ff8b17623f64ac7835a590e79d916e758ac (patch) | |
tree | 4f75a8f9e0e30cf8c7e944ea2c4461be396c0d5f /doc | |
parent | 0e2fc1701bd0c87cc458cbbb34c618b0e0dc5a14 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/user/gitlab_com/index.md | 2 | ||||
-rw-r--r-- | doc/user/project/repository/git_blame.md | 50 | ||||
-rw-r--r-- | doc/user/project/repository/git_history.md | 67 | ||||
-rw-r--r-- | doc/user/project/repository/img/file_blame_button_v12_6.png | bin | 0 -> 22175 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/file_blame_output_v12_6.png | bin | 0 -> 96929 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/file_history_button_v12_6.png | bin | 0 -> 22175 bytes | |||
-rw-r--r-- | doc/user/project/repository/img/file_history_output_v12_6.png | bin | 0 -> 84738 bytes | |||
-rw-r--r-- | doc/user/project/repository/index.md | 2 |
8 files changed, 120 insertions, 1 deletions
diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md index 466e4e43bfc..525a8f7a94c 100644 --- a/doc/user/gitlab_com/index.md +++ b/doc/user/gitlab_com/index.md @@ -91,7 +91,7 @@ GitLab.com, CI/CD, and related services are deployed into Google Cloud Platform IP based firewall can be configured by looking up all [IP address ranges or CIDR blocks for GCP](https://cloud.google.com/compute/docs/faq#where_can_i_find_product_name_short_ip_ranges). -[Static endpoints](https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5071) are being considered. +[Static endpoints](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/97) are being considered. ## Shared Runners diff --git a/doc/user/project/repository/git_blame.md b/doc/user/project/repository/git_blame.md new file mode 100644 index 00000000000..454b3f86df9 --- /dev/null +++ b/doc/user/project/repository/git_blame.md @@ -0,0 +1,50 @@ +--- +type: reference, howto +description: "Documentation on Git file blame." +--- + +# Git file blame + +> [Introduced](https://git.sphere.ly/staff/publicgitlab/commit/39c657930625ddc3ac8a921f01ffc83acadce68f) in GitLab 2.5 + +[Git blame](https://git-scm.com/docs/git-blame) provides more information +about every line in a file, including the last modified time, author, and +commit hash. + +You can find the **Blame** button with each file in a project. + +![File blame button](img/file_blame_button_v12_6.png "Blame button") + +When you select the **Blame** button, you'll see a screen with the +noted information: + +![Git blame output](img/file_blame_output_v12_6.png "Blame button output") + +If you hover over a commit in the UI, you'll see a precise date and time +for that commit. + +## Associated `git` command + +If you're running `git` from the command line, the equivalent command is +`git blame <filename>`. For example, if you want to find `blame` information +about a `README.md` file in the local directory, run the following command: + +```bash +git blame README.md +``` + +You'll see output similar to the following, which includes the commit time +in UTC format: + +```bash +62e2353a (Achilleas Pipinellis 2019-07-11 14:52:18 +0300 1) [![build status](https://gitlab.com/gitlab-org/gitlab-docs/badges/master/build.svg)](https://gitlab.com/gitlab-com/gitlab-docs/commits/master) +fb0fc7d6 (Achilleas Pipinellis 2016-11-07 22:21:22 +0100 2) +^764ca75 (Connor Shea 2016-10-05 23:40:24 -0600 3) # GitLab Documentation +^764ca75 (Connor Shea 2016-10-05 23:40:24 -0600 4) +0e62ed6d (Mike Jang 2019-11-26 21:44:53 +0000 5) This project hosts the repository used to generate the GitLab +0e62ed6d (Mike Jang 2019-11-26 21:44:53 +0000 6) documentation website and deployed to https://docs.gitlab.com. It uses the +``` + +## File blame through the API + +You can also get this information over the [Git file blame REST API](../../../api/repository_files.md#get-file-blame-from-repository). diff --git a/doc/user/project/repository/git_history.md b/doc/user/project/repository/git_history.md new file mode 100644 index 00000000000..9cd3d0d4ed0 --- /dev/null +++ b/doc/user/project/repository/git_history.md @@ -0,0 +1,67 @@ +--- +type: reference, howto +description: "Documentation on Git file history." +--- + +# Git file history + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/blob/9ba1224867665844b117fa037e1465bb706b3685/app/controllers/commits_controller.rb) in GitLab 0.8.0 + +Git file History provides information about the commit history associated +with a file. + +You can find the **History** button with each file in a project. + +![File history button](img/file_history_button_v12_6.png "History button") + +When you select the **History** button, you'll see a screen with the +noted information: + +![Git log output](img/file_history_output_v12_6.png "History button output") + +If you hover over a commit in the UI, you'll see a precise date and time +that commit was last modified. + +## Associated `git` command + +If you're running `git` from the command line, the equivalent command +is `git log <filename>`. For example, if you want to find `history` +information about a `README.md` file in the local directory, run the +following command: + +```bash +git log README.md +``` + +You'll see output similar to the following, which includes the commit +time in UTC format: + +```bash +commit 0e62ed6d9f39fa9bedf7efc6edd628b137fa781a +Author: Mike Jang <mjang@gitlab.com> +Date: Tue Nov 26 21:44:53 2019 +0000 + + Deemphasize GDK as a doc build tool + +commit 418879420b1e3a4662067bd07b64bb6988654697 +Author: Marcin Sedlak-Jakubowski <msedlakjakubowski@gitlab.com> +Date: Mon Nov 4 19:58:27 2019 +0100 + + Fix typo + +commit 21cc1fef11349417ed515557748369cfb235fc81 +Author: Jacques Erasmus <jerasmus@gitlab.com> +Date: Mon Oct 14 22:13:40 2019 +0000 + + Add support for modern JS + + Added rollup to the project + +commit 2f5e895aebfa5678e51db303b97de56c51e3cebe +Author: Achilleas Pipinellis <axil@gitlab.com> +Date: Fri Sep 13 14:03:01 2019 +0000 + + Remove gitlab-foss Git URLs as we don't need them anymore + + [ci skip] +``` diff --git a/doc/user/project/repository/img/file_blame_button_v12_6.png b/doc/user/project/repository/img/file_blame_button_v12_6.png Binary files differnew file mode 100644 index 00000000000..b5a18e6726f --- /dev/null +++ b/doc/user/project/repository/img/file_blame_button_v12_6.png diff --git a/doc/user/project/repository/img/file_blame_output_v12_6.png b/doc/user/project/repository/img/file_blame_output_v12_6.png Binary files differnew file mode 100644 index 00000000000..4aca40353d5 --- /dev/null +++ b/doc/user/project/repository/img/file_blame_output_v12_6.png diff --git a/doc/user/project/repository/img/file_history_button_v12_6.png b/doc/user/project/repository/img/file_history_button_v12_6.png Binary files differnew file mode 100644 index 00000000000..b5a18e6726f --- /dev/null +++ b/doc/user/project/repository/img/file_history_button_v12_6.png diff --git a/doc/user/project/repository/img/file_history_output_v12_6.png b/doc/user/project/repository/img/file_history_output_v12_6.png Binary files differnew file mode 100644 index 00000000000..9e9855203af --- /dev/null +++ b/doc/user/project/repository/img/file_history_output_v12_6.png diff --git a/doc/user/project/repository/index.md b/doc/user/project/repository/index.md index cb7fe63db6f..fc422bb5aba 100644 --- a/doc/user/project/repository/index.md +++ b/doc/user/project/repository/index.md @@ -48,6 +48,8 @@ it's easier to do so [via GitLab UI](web_editor.md): - [File templates](web_editor.md#template-dropdowns) - [Create a directory](web_editor.md#create-a-directory) - [Start a merge request](web_editor.md#tips) +- [Find file history](git_history.md) +- [Identify changes by line (Git blame)](git_blame.md) **From the command line:** |