git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Commit hashes differ from local and remote

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 15, 2011, 15:26 UTC
Message-ID
<BANLkTinEJkLbZRc+=wMUaBRKq=xpxYhk3Q@mail.gmail.com>
In-Reply-To
<BANLkTimhx1tN7EzU94bpKK64P1F8P7MG0g@mail.gmail.com>
On Wed, Apr 13, 2011 at 21:38, Arthur Debert <arthur@stimuli.com.br> wrote:
Show 12 quoted lines
> Hi Folks.
>
> I'm seeing some behavior that my git-fu isn't quite capable of explaining.
>
> On a local branch the last commit has a hash different than the remote
> branch it is tracking from. Nothing has been committed locally and
> doing:
> $ git diff branch-name origin/branch-name
> Comes up empty
> git pull also says my branch is already up to date.
>
> It seems that git pull has generated a bogus commit (a merge commit),

git pull is designed to create merge commits, if needed. In your case both branches just have the same content, for whatever reason.

You probably want to specify "--ff-only" (only fast-forwards) to all your pulls to achieve what you seem to want.

Previous: John SzakmeisterNext: Arthur Debert
Message 3 of 4 in “Commit hashes differ from local and remote”
  1. Arthur DebertApr 13, 2011
  2. John SzakmeisterApr 15, 2011
  3. Alex RiesenApr 15, 2011
  4. Arthur DebertApr 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.