사용자 도구

사이트 도구


git:gitlab

Gitlab

gitlab-cli

Disable Force Push

#!/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;

auto merge / 자동 머지

참조

git/gitlab.txt · 마지막으로 수정됨: 2023/05/19 10:20 저자 kwon37xi