Git 파일 이력

Tier: Free, Premium, Ultimate Offering: GitLab.com, Self-managed, GitLab Dedicated

Git 파일 이력은 파일과 관련된 커밋 이력에 대한 정보를 제공합니다. 사용하려면 다음을 수행하세요:

  1. 프로젝트의 Code > Repository로 이동합니다.
  2. 오른쪽 상단에서 History를 선택합니다.

History를 선택하면 다음 정보가 표시됩니다:

Git log output

UI에서 커밋 위로 마우스를 올리면 커밋 수정의 정확한 날짜와 시간이 표시됩니다.

커밋할 때 기여자의 이름과 이메일 정보는 Git 구성에서 검색됩니다.

이력 범위 제한

이러한 경우에는 URL에 committed_beforecommitted_after 날짜를 매개변수로 추가하여 검색 기간을 제한할 수 있습니다. 이를 위해서는 URL에 &committed_before=YYYY-MM-DD 또는 committed_after=YYYY-MM-DD 매개변수를 추가하십시오.

예를 들면:

https://gitlab.com/gitlab-org/gitlab/-/commits/master/README.md?ref_type=heads&committed_before=2010-11-22&committed_after=2008-05-15

이렇게 하면 매우 큰 저장소에서 커밋 이력 요청 시 타임아웃을 해결하는 데 필요할 수 있습니다.

관련된 git 명령어

명령 줄에서 git을 실행하는 경우 해당하는 명령어는 git log <filename>입니다. 예를 들어, 로컬 디렉터리에서 README.md 파일에 대한 history 정보를 찾으려면 다음 명령을 실행합니다:

git log README.md

Git은 다음과 유사한 출력을 표시하며 이는 커밋 시간을 UTC 형식으로 포함합니다:

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]