Hell0 Hell0 - 1 year ago 76
Git Question

git push isn't syncing worktree directory

I'm working on a locale repository


Now, i must do
git checkout
on the server side, everytime i need to push anything updated. (i can handle that).

The problem is that isn't synchronizing anything in the
, on the server side (remote).
That means the
script isn't doing their work


# post-receive -- script
git --work-tree='/var/www/some_git_repo' --git-dir='/var/repo/some_git_repo.git'

Answer Source

Well, this response is not the preferible solution, but it resolve the problem, by updating the working-tree with a simple executable script:

rsync -arv --exclude=something_tobe_excluded \
  --progress repo_source-dir working_tree

Every file/directory_path, must be specified as a single argument. (on the exclude variable).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download