{"thread":{"id":"27091","subject":"Commit hashes differ from local and remote","startedAt":"2011-04-13T19:38:26Z","lastAt":"2011-04-15T15:41:52Z","messageCount":4,"participants":["Arthur Debert","John Szakmeister","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"165771","messageId":"BANLkTimhx1tN7EzU94bpKK64P1F8P7MG0g@mail.gmail.com","threadId":"27091","inReplyTo":null,"subject":"Commit hashes differ from local and remote","fromName":"Arthur Debert","fromEmail":"arthur@stimuli.com.br","sentAt":"2011-04-13T19:38:26Z","receivedAt":"2011-04-13T19:38:26Z","isPatch":false,"sender":{"key":"arthur@stimuli.com.br","avatar":null},"body":"Hi Folks.\n\nI'm seeing some behavior that my git-fu isn't quite capable of explaining.\n\nOn a local branch the last commit has a hash different than the remote\nbranch it is tracking from. Nothing has been committed locally and\ndoing:\n$ git diff branch-name origin/branch-name\nComes up empty\ngit pull also says my branch is already up to date.\n\nIt seems that git pull has generated a bogus commit (a merge commit),\nbut I can't quite figure out why.\nThis is specially important since we need our app servers to have the\nsame commit hash once git pull is done.\n\nAnything obvious I'm missing out? Any extra info that can help\npinpoint what the issue is?\n\nThank you,\nArthur Debert\n"},{"id":"165866","messageId":"BANLkTi=oXF95aE90Wn=E=yX8P6r79vOOcQ@mail.gmail.com","threadId":"27091","inReplyTo":"BANLkTimhx1tN7EzU94bpKK64P1F8P7MG0g@mail.gmail.com","subject":"Re: Commit hashes differ from local and remote","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2011-04-15T01:46:52Z","receivedAt":"2011-04-15T01:46:52Z","isPatch":false,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"On Wed, Apr 13, 2011 at 3:38 PM, Arthur Debert <arthur@stimuli.com.br> wrote:\n> Hi Folks.\n>\n> I'm seeing some behavior that my git-fu isn't quite capable of explaining.\n>\n> On a local branch the last commit has a hash different than the remote\n> branch it is tracking from. Nothing has been committed locally and\n> doing:\n> $ git diff branch-name origin/branch-name\n> Comes up empty\n> git pull also says my branch is already up to date.\n>\n> It seems that git pull has generated a bogus commit (a merge commit),\n> but I can't quite figure out why.\n> This is specially important since we need our app servers to have the\n> same commit hash once git pull is done.\n>\n> Anything obvious I'm missing out? Any extra info that can help\n> pinpoint what the issue is?\n\nMaybe you did a git merge instead of a git pull?  Does 'gitk --all'\nshow you anything interesting?  I find it useful in understanding\nissues like this.  It does sound like a merge happened, without having\nany more information to go on.\n\n-John\n"},{"id":"165903","messageId":"BANLkTinEJkLbZRc+=wMUaBRKq=xpxYhk3Q@mail.gmail.com","threadId":"27091","inReplyTo":"BANLkTimhx1tN7EzU94bpKK64P1F8P7MG0g@mail.gmail.com","subject":"Re: Commit hashes differ from local and remote","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2011-04-15T15:26:01Z","receivedAt":"2011-04-15T15:26:01Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Wed, Apr 13, 2011 at 21:38, Arthur Debert <arthur@stimuli.com.br> wrote:\n> Hi Folks.\n>\n> I'm seeing some behavior that my git-fu isn't quite capable of explaining.\n>\n> On a local branch the last commit has a hash different than the remote\n> branch it is tracking from. Nothing has been committed locally and\n> doing:\n> $ git diff branch-name origin/branch-name\n> Comes up empty\n> git pull also says my branch is already up to date.\n>\n> It seems that git pull has generated a bogus commit (a merge commit),\n\ngit pull is designed to create merge commits, if needed.\nIn your case both branches just have the same content,\nfor whatever reason.\n\nYou probably want to specify \"--ff-only\" (only fast-forwards) to all\nyour pulls to achieve what you seem to want.\n"},{"id":"165905","messageId":"BANLkTikoaKbxBT=E1sXKV6ScLa7eFh8TWw@mail.gmail.com","threadId":"27091","inReplyTo":"BANLkTinEJkLbZRc+=wMUaBRKq=xpxYhk3Q@mail.gmail.com","subject":"Re: Commit hashes differ from local and remote","fromName":"Arthur Debert","fromEmail":"arthur@stimuli.com.br","sentAt":"2011-04-15T15:41:52Z","receivedAt":"2011-04-15T15:41:52Z","isPatch":false,"sender":{"key":"arthur@stimuli.com.br","avatar":null},"body":"Thanks Alex and John, this makes sense.\n\nCheers\n-- \nArthur Debert\nwww.stimuli.com.br\n"}]}