My system is centos 7.4 with git 1.8.3.
Based on this post,I set sparse-checkout
in my remoteserver
bare repo as below:
!README.md
!.scrutinizer.yml
!.idea/*
!.idea_modules/*
/*
And I think permission is right:
[root@localhost info]# ls -al
total 8
drwxr-xr-x 2 root root 44 Jan 28 11:17 .
drwxr-xr-x 7 root root 132 Jan 28 11:33 ..
-rw-r--r-- 1 root root 240 Jan 28 14:33 exclude
-rw-r--r-- 1 root root 58 Jan 28 11:17 sparse-checkout
When I git push remoteserver master
,post-receive
hook will run:
git --work-tree="$DEPLOY_DIR" --git-dir="$GIT_DIR" checkout -f
The problem is :
README.md
and .scrutinizer.yml
still checkout.
How to make README.md
and .scrutinizer.yml
not checkout as setting in sparse-checkout
?