Re: git push stages original version on server
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Sep 11, 2009, 11:09 UTC
- Message-ID
- <4AAA2FE7.5020802@gnu.org>
- In-Reply-To
- <D7E5118C-AE88-4C4B-8D8A-5AF16ECF731D@roalddevries.nl>
Pushing to a non-bare repository is discouraged.
> - How can I have git automatically checkout pushed changes on the server?
I think you could in principle add a hook that does the "git checkout" or "git reset --hard $(git symbolic-ref HEAD)", but I suggest pushing to a bare repository and have the hook trigger a "git pull" elsewhere.
Paolo