debian-mirror-gitlab/doc/user/project/repository/git_history.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.9 KiB
Markdown
Raw Normal View History

2020-01-01 13:55:28 +05:30
---
2020-10-24 23:57:45 +05:30
stage: Create
group: Source Code
2021-02-22 17:27:13 +05:30
info: 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
2020-01-01 13:55:28 +05:30
type: reference, howto
description: "Documentation on Git file history."
---
2021-03-11 19:13:27 +05:30
# Git file history **(FREE)**
2020-01-01 13:55:28 +05:30
Git file History provides information about the commit history associated
2021-04-29 21:17:54 +05:30
with a file. To use it:
2020-01-01 13:55:28 +05:30
2021-04-29 21:17:54 +05:30
1. Go to your project's **Repository > Files**.
1. In the upper right corner, select **History**.
2020-01-01 13:55:28 +05:30
2021-04-29 21:17:54 +05:30
When you select **History**, this information is displayed:
2020-01-01 13:55:28 +05:30
![Git log output](img/file_history_output_v12_6.png "History button output")
2021-04-17 20:07:23 +05:30
If you hover over a commit in the UI, the precise date and time of the commit modification
are shown.
2020-01-01 13:55:28 +05:30
## 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:
2020-03-13 15:44:24 +05:30
```shell
2020-01-01 13:55:28 +05:30
git log README.md
```
2021-04-17 20:07:23 +05:30
Git displays output similar to the following, which includes the commit
2020-01-01 13:55:28 +05:30
time in UTC format:
2020-03-13 15:44:24 +05:30
```shell
2020-01-01 13:55:28 +05:30
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]
```