git - updating working files on the remote server
I have a remote development server and every time when I do a code change on my local machine I need to make sure the code I've changed works properly on the dev (remote server).Below is the setup I have so far:
- On the - remote serverI have:- A git repository created on a folder called - devwith a bunch of files (I used- git initand than- git add .- to add all those files to the repository).- Then from that repository I 开发者_如何学编程created a branch called - master-copy.
- On my - local machineI created a clone from the remote server's- master-copybranch. Now every time when I make changes on my clonen copy I do a push to the- master-copybranch on the remote server.
Is there a way to update the files located on dev folder (on the remote server) when I do I push from my local machine cloned copy to the master-copy branch (on the remote server)?
You should look at git-receive-pack for information on installing hooks which are triggered when you push to a repository.
See Git Book for some examples of scripts which can checkout for you after pushing.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论