On Fri, 21 Sep 2012 11:47:53 -0400 Bart Baker <bart...@gmail.com> wrote:
> What I'd like to do is have a copy of the code that always sits on a > shared drive visible to multiple users. I have a situation where > users who don't use Git would like to occasionally view the code base > without editing it. > > Could I somehow have the centralized push/pull origin location > display the code? > > If no, would I need to write a script that runs every few minutes/hour > (s) that pulls from a shared drive and updates that copy of the code? > > Any other suggestions? What you described is in fact just a case of "post receive" deployment of a certain branch. Hence you just google for something like git+deployment or git+web+deployment and study the proposed solutions. Usually the deployment is done by a post-receive hook created in the target repository. There are usually two approaches to this: 1) The remote repository is a non-bare (normal) repo consisting of the work tree and the ".git" directory in it. You check out the branch you want to "expose" in that repository, configure the repository to allow pushes to that branch by setting the receive.denyCurrentBranch conf. variable to "false" and then arrange your hook to force-update the work tree, say, by running `git reset --hard HEAD` in it. Then after each push to the branch which is checked out, the work tree will be updated. Obviously, you should never do any development in that work tree. 2) The remote repository is a bare repo, and your hook arranges for updating some specific directory after the branch being monitored is updated. This is trickier than the first case but might be thought of as being more clean design. There are also several ways to update the location to be exposed. I suggest you to study what you'll google on this topic and make your pick as there's no one true solution. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.