My local and remote server both are centos 7.
I tracked README.md
in local repo with git version 1.8.3.1.When I revised README.md
and push to remote bare repo, I don't want README.md
to be checked out.
In remote repo,git version is 2.16.6,I set post-receive
as below:
while read oldrev newrev ref
do
if [[ $ref = refs/heads/"$BRANCH" ]];
then
git --work-tree="$DEPLOY_DIR" --git-dir="$GIT_DIR" checkout -f
fi
done
In remote repo,I set sparse-checkout
as below:
/*
!/README.md
I found README.md
still there,and not modified.
Then,I revised sparse-checkout
as below:
!/README.md
/*
I got remote: error: Entry 'README.md' not uptodate. Cannot merge.
which sparse-checkout
is correct?Where is the problem?