Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've a bare GIT repo on my own server (not Github or anythin). It has a post-receive with 2 checkouts:

#!/bin/sh
GIT_WORK_TREE=/var/www/riagg git checkout -f
GIT_WORK_TREE=/var/www/virenze git checkout -f

The idea, obviously, is for riagg and virenze to have the exact same codebase. That works for existing and new files. When I push I get 0, 1 or 2 lines like this:

remote: Checking out files: 100% (2737/2737), done.

I've no idea why 0, 1 or 2 and not always 2, but I don't think that's the problem. Other repo's that have only 1 checkout usually don't say anything about "Checking out files".

The problem is 'old' files. Deleted files aren't deleted in the checkout! They are for the first checkout (now riagg), but they're not for the second (now virenze). When I change a folder name locally and push that, the old folder still exists in virenze (and the new one too).

When I change the checkout order, it changes the checkout bug to that order: the first works and the second doesn't.

What am I doing wrong? This doesn't seem like a very edgy case. Repo settings:

  • core.bare = false (I don't know why it's not bare.....)
  • core.worktree = empty

I've another repo (same settings) that checks out 3 times and I see now that the same happens there: adding and updating, but no deleting.

edit: I've tried setting core.bare to true but that doesn't fix it.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.