If I set up a post-recieve hook in git like
#!/bin/sh
GIT_WORK_TREE=/var/www/www.example.org git checkout -f
Will that delete files that are o
It depends if the files will be deleted depending if they already existed in the repository prior to the checkout.
If the files that are on the server (/var/www/www.example.org) are tracked in the repo on the server but the new checkout includes a change that removed them then they will be removed on the server side.
If the files that are on the server are NOT tracked in the repo on the server then they will stay. Since Git doesn't know about them Git won't remove them.
To tell if they are tracked on the server you can do git status <file in question>
. If it says:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# <file in question>
Then you know that a checkout would not remove .
Just take note if later exists in a new checkout than the next checkout which removes would remove it.