{"thread":{"id":"23327","subject":"Git-Automerge","startedAt":"2010-04-04T16:47:14Z","lastAt":"2010-04-04T17:00:15Z","messageCount":3,"participants":["Nico Schümann","Matthieu Moy","Ramkumar Ramachandra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138541","messageId":"w2j1f05046e1004040947k3b812063ndbc2f8da3496effb@mail.gmail.com","threadId":"23327","inReplyTo":null,"subject":"Git-Automerge","fromName":"Nico Schümann","fromEmail":"nico.schuemann@googlemail.com","sentAt":"2010-04-04T16:47:14Z","receivedAt":"2010-04-04T16:47:14Z","isPatch":false,"sender":{"key":"nico.schuemann@googlemail.com","avatar":null},"body":"Dear Git people,\n\nafter having been convinced by Linus Torvald's talk on git, I've been\nusing it for some days now.\n\nBut there is one thing that just does not get into my mind, or maybe I\nam just thinking too complicated.\n\nWhat I have is a productive system, let's call it MASTER and my\ndevelopment machine, call it ME.\n\nNow I made a copy of the MASTER tree by\n$ git pull me@master:/path/to/stuff\n\nAnd did some changes:\n$ nano -w blablabla\n\nThen I commited:\n$ git commit\n\nEverything fine until now.\n\nWhat I want now are the changes to apper on the MASTER server, so I say\n$ git push\n\nBut the changes do not appear on the master server. I have to type\n\n# git reset --hard      or\n# git checkout -f\nin order to make the changes appear. Since I do not want to login onto\nthat MASTER machine every time, what command do I miss on my developer\nmachine?\n\nThanks in advantage,\nNico\n"},{"id":"138542","messageId":"vpqr5mv40s2.fsf@bauges.imag.fr","threadId":"23327","inReplyTo":"w2j1f05046e1004040947k3b812063ndbc2f8da3496effb@mail.gmail.com","subject":"Re: Git-Automerge","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2010-04-04T16:53:33Z","receivedAt":"2010-04-04T16:53:33Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Nico Schümann <nico.schuemann@googlemail.com> writes:\n\n> But the changes do not appear on the master server. I have to type\n>\n> # git reset --hard      or\n> # git checkout -f\n\nYou pushed to a checked-out branch. You shouldn't do that, and recent\nGit prevent you from doing it.\n\nThe reason Git cannot do the merge automatically is that a merge can\ngo wrong, and may require a human interaction to resolve conflicts.\nHence, \"push\" never does a merge, only \"pull\" (and obviously local\nmerge) will do.\n\nYou can do\n\nclient-machine$ git push URL-OF-SERVER HEAD:tmp\n\nto push your current HEAD to a branch named \"tmp\" on the server, and\nthen\n\nserver-machine$ git merge tmp\n\nto merge the changes in the current branch of the server. Another\noption is to have a bare repository reachable from both machines, and\nboth machine would push/pull to this repository (just like you'd do\nwith a centralized version control system).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"138543","messageId":"z2sf3271551004041000yaba616fbu20701cd505c5dbf7@mail.gmail.com","threadId":"23327","inReplyTo":"w2j1f05046e1004040947k3b812063ndbc2f8da3496effb@mail.gmail.com","subject":"Re: Git-Automerge","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-04-04T17:00:15Z","receivedAt":"2010-04-04T17:00:15Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\nOn Sun, Apr 4, 2010 at 10:17 PM, Nico Schümann\n<nico.schuemann@googlemail.com> wrote:\n> $ git push\n>\n> But the changes do not appear on the master server. I have to type\n>\n> # git reset --hard      or\n> # git checkout -f\n\ngit-push only propagates history and updates refs. It doesn't touch\nfiles in the working tree. I suspect you're pushing to a non-bare\nremote. Please see --bare option in git-init (1) and this FAQ [0] on\nthe Git Wiki for more.\n\n[0] https://git.wiki.kernel.org/index.php/GitFaq#Why_won.27t_I_see_changes_in_the_remote_repo_after_.22git_push.22.3F\n\n-- Ram\n"}]}