Re: [git-users] Creating an up-to-date version of master branch on network drive
> 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. The remote repository is already bare, so option 2) is likely the direction that I'll need to go. I seem to have found some good documentation referencing how to do this. Your response was very helpful and the search terms you suggested quickly yielded helpful answers. Thank you. -Bart -- 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.
Re: [git-users] Creating an up-to-date version of master branch on network drive
From: "Bart Baker" Hello, 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? Thanks, Bart I'm on a corporate Windows environment. My approach (*) is that the network (mapped T:) drive is a live repo with "master" checked out, and that on my local machine (D:) I have a local clone, and I do not do any work on my local master other than pull and merge. I can push my branches to the network remote whenever required. When required I can change to version everyone else sees on the network drive I can simply open that repo on the mapped drive (T:) and adjust (true merge or update a ref, etc) the master branch, and get time stamps etc to fit what other viewers expect. I'm now using git extensions and starting to show what I'm doing to those fellow engineers I feel could be influenced. (*) my situation is that most folk simply use the network drive as a 'project drive' and have particular directories they tend to use (everyone on the team has r/w access), with occasional zips of versions. However I want to have the benefits of git, so I'm starting using it under the radar so to speak. As most users haven't changed their deafult windows settings, so don't see/notice the .git directory, nor the .gitignore, so don't immediately notice. Philip -- 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.
Re: [git-users] Creating an up-to-date version of master branch on network drive
On Fri, 21 Sep 2012 11:47:53 -0400 Bart Baker 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.