<div dir="ltr">> <span style="color:rgb(33,33,33)">Warning: doing "git push" to a non-bare repository is generally not </span><span style="color:rgb(33,33,33)">recommended</span><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">Very true, my mistake for not being specific here. I do indeed use receive.denyCurrentBranch and it works like a charm.</span></div><div><span style="color:rgb(33,33,33)"><br></span></div><div><span style="color:rgb(33,33,33)">Thanks for the clarification.</span></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Dec 4, 2016 at 2:57 PM Brian Candler <<a href="mailto:b.candler@pobox.com">b.candler@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 04/12/2016 21:26, Jacob MacDonald wrote:<br class="gmail_msg">
> The repository is not stored as bare; That way I can access the files<br class="gmail_msg">
> in the repository directly from Drive<br class="gmail_msg">
<br class="gmail_msg">
Warning: doing "git push" to a non-bare repository is generally not<br class="gmail_msg">
recommended, although you can do it with a post-update hook, or you can<br class="gmail_msg">
use a feature introduced in git 2.3 called "push to deploy":<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://github.com/blog/1957-git-2-3-has-been-released" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/blog/1957-git-2-3-has-been-released</a><br class="gmail_msg">
<br class="gmail_msg">
To use this, you have to set config "receive.denyCurrentBranch =<br class="gmail_msg">
updateInstead" on the server copy of the repository.<br class="gmail_msg">
<br class="gmail_msg">
Otherwise: normally what happens is pushing to the repo updates the<br class="gmail_msg">
objects in the repo but *not* the checked-out working copy, which can<br class="gmail_msg">
get your repo into a very confusing state.  See:<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://git.wiki.kernel.org/index.php?title=Git_FAQ&oldid=23811#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F" rel="noreferrer" class="gmail_msg" target="_blank">https://git.wiki.kernel.org/index.php?title=Git_FAQ&oldid=23811#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F</a><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>