{"thread":{"id":"25180","subject":"Update Webservers from a remote repository","startedAt":"2010-09-21T09:02:51Z","lastAt":"2010-09-21T10:52:52Z","messageCount":3,"participants":["Matthias Fechner","Ilari Liusvaara"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151193","messageId":"4C9874BB.5060908@fechner.net","threadId":"25180","inReplyTo":null,"subject":"Update Webservers from a remote repository","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2010-09-21T09:02:51Z","receivedAt":"2010-09-21T09:02:51Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Dear list,\n\nI'm new to git but the more I use it I more I like/love it. :)\n\nI have a central --bare git repository which is the master for all web \nservers (I did a git clone http://xxx on each web server).\nIf I now push changes from my devel station to the central repository I \nwould like to have them available on all server with a script.\n\nIf I understood everything correctly I execute the following commands on \neach server:\ngit checkout master (to be sure we are on branch master)\ngit fetch (to fetch changes from the central repository)\ngit merge origin (to update the repo to the changes on the central repo)\n\nI use here origin because the remote name for the central server in the \n.git/config file is named origin.\n\nIs that correct or did I missed something?\n\nThanks,\nMatthias\n\n-- \n\"Programming today is a race between software engineers striving to \nbuild bigger and better idiot-proof programs, and the universe trying to \nproduce bigger and better idiots. So far, the universe is winning.\" -- \nRich Cook\n"},{"id":"151196","messageId":"20100921094128.GA13619@LK-Perkele-V2.elisa-laajakaista.fi","threadId":"25180","inReplyTo":"4C9874BB.5060908@fechner.net","subject":"Re: Update Webservers from a remote repository","fromName":"Ilari Liusvaara","fromEmail":"ilari.liusvaara@elisanet.fi","sentAt":"2010-09-21T09:41:28Z","receivedAt":"2010-09-21T09:41:28Z","isPatch":false,"sender":{"key":"ilari.liusvaara@elisanet.fi","avatar":null},"body":"On Tue, Sep 21, 2010 at 11:02:51AM +0200, Matthias Fechner wrote:\n> \n> If I understood everything correctly I execute the following\n> commands on each server:\n> git checkout master (to be sure we are on branch master)\n> git fetch (to fetch changes from the central repository)\n> git merge origin (to update the repo to the changes on the central repo)\n> \n> Is that correct or did I missed something?\n\nI would do it the following way:\n\ngit checkout -f master\ngit fetch origin\ngit reset --hard orgin/master\n\n\nYou definitely do not want to run merge non-interactively (conflict risk!)\n\n-Ilari\n"},{"id":"151200","messageId":"4C988E84.8020702@fechner.net","threadId":"25180","inReplyTo":"20100921094128.GA13619@LK-Perkele-V2.elisa-laajakaista.fi","subject":"Re: Update Webservers from a remote repository","fromName":"Matthias Fechner","fromEmail":"idefix@fechner.net","sentAt":"2010-09-21T10:52:52Z","receivedAt":"2010-09-21T10:52:52Z","isPatch":false,"sender":{"key":"idefix@fechner.net","avatar":"https://gravatar.com/avatar/3bbc5542677a77cb9b75262e4ad2eeb04a0960f0b8dec89a178db17cf472cce7?d=mp&s=160"},"body":"Am 21.09.10 11:41, schrieb Ilari Liusvaara:\n> git checkout -f master\n> git fetch origin\n> git reset --hard origin/master\n>\n> You definitely do not want to run merge non-interactively (conflict risk!)\n\noh good point, thanks a lot.\n\nBye,\nMatthias\n\n-- \n\"Programming today is a race between software engineers striving to \nbuild bigger and better idiot-proof programs, and the universe trying to \nproduce bigger and better idiots. So far, the universe is winning.\" -- \nRich Cook\n"}]}