사용자 도구

사이트 도구


git:gitlab

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
git:gitlab [2021/03/23 14:28]
kwon37xi
git:gitlab [2022/07/07 17:18]
kwon37xi
줄 1: 줄 1:
 ====== Gitlab ====== ====== Gitlab ======
   * https://about.gitlab.com   * https://about.gitlab.com
 +
 +===== gitlab-cli =====
 +  * https://glab-cli.io/
 +  * https://github.com/profclems/glab
 +
 +
 +====== Disable Force Push ======
 +  * rebase, squash 등으로 이미 remote 에 반영된 커밋을 변경하는 것을 방지하기.
 +  * 각각 리포지토리의 branch 별로 설정하는게 있긴하지만, 전역 반영기능은 현재 없다.
 +  * 따라서 gitlab hook을 사용해야 한다.
 +  * [[https://stackoverflow.com/questions/45374801/is-it-possible-in-gitlab-to-disable-force-push-for-all-branches-but-allow-to-de|Is it possible in Gitlab to disable force push for all branches, but allow to delete them? - Stack Overflow]]
 +  * ''gitlab-shell/hooks/pre-receive.d/disable-force-push.sh''
 +<code sh>
 +#!/bin/sh
 +# <oldrev> <newrev> <refname>
 +# update a blame tree
 +
 +while read oldrev newrev ref ; do
 +    # old revision is blank - branch creation
 +    if [ "$oldrev" = "0000000000000000000000000000000000000000" ] || 
 +         # new revision is blank - branch deletion
 +         [ "$newrev" = "0000000000000000000000000000000000000000" ] ;
 +    then
 +        # create new or delete old branch
 +        continue;
 +    fi
 +
 +    base=$(git merge-base $oldrev $newrev);
 +    if [ "$base" != "$oldrev" ] ; then
 +        # non fast forward merge
 +        echo "Force pushing of $ref is forbidden";
 +        exit 1;
 +    fi
 +done
 +exit 0;
 +</code>
  
 ===== 참조 ===== ===== 참조 =====
   * [[https://docs.gitlab.com/ee/ci/unit_test_reports.html|Unit test reports | GitLab]]   * [[https://docs.gitlab.com/ee/ci/unit_test_reports.html|Unit test reports | GitLab]]
   * [[https://qiita.com/leechungkyu/items/ff82c3bcd2b7dd9e8a18|JIRA Development 패널에 GitLab 연동하기 - Qiita]]   * [[https://qiita.com/leechungkyu/items/ff82c3bcd2b7dd9e8a18|JIRA Development 패널에 GitLab 연동하기 - Qiita]]
git/gitlab.txt · 마지막으로 수정됨: 2023/05/19 10:20 저자 kwon37xi