* Commit hashes differ from local and remote
@ 2011-04-13 19:38 Arthur Debert
2011-04-15 1:46 ` John Szakmeister
2011-04-15 15:26 ` Alex Riesen
0 siblings, 2 replies; 4+ messages in thread
From: Arthur Debert @ 2011-04-13 19:38 UTC (permalink / raw)
To: Git mailing list
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),
but I can't quite figure out why.
This is specially important since we need our app servers to have the
same commit hash once git pull is done.
Anything obvious I'm missing out? Any extra info that can help
pinpoint what the issue is?
Thank you,
Arthur Debert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Commit hashes differ from local and remote
2011-04-13 19:38 Commit hashes differ from local and remote Arthur Debert
@ 2011-04-15 1:46 ` John Szakmeister
2011-04-15 15:26 ` Alex Riesen
1 sibling, 0 replies; 4+ messages in thread
From: John Szakmeister @ 2011-04-15 1:46 UTC (permalink / raw)
To: Arthur Debert; +Cc: Git mailing list
On Wed, Apr 13, 2011 at 3:38 PM, Arthur Debert <arthur@stimuli.com.br> wrote:
> 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),
> but I can't quite figure out why.
> This is specially important since we need our app servers to have the
> same commit hash once git pull is done.
>
> Anything obvious I'm missing out? Any extra info that can help
> pinpoint what the issue is?
Maybe you did a git merge instead of a git pull? Does 'gitk --all'
show you anything interesting? I find it useful in understanding
issues like this. It does sound like a merge happened, without having
any more information to go on.
-John
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Commit hashes differ from local and remote
2011-04-13 19:38 Commit hashes differ from local and remote Arthur Debert
2011-04-15 1:46 ` John Szakmeister
@ 2011-04-15 15:26 ` Alex Riesen
2011-04-15 15:41 ` Arthur Debert
1 sibling, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2011-04-15 15:26 UTC (permalink / raw)
To: Arthur Debert; +Cc: Git mailing list
On Wed, Apr 13, 2011 at 21:38, Arthur Debert <arthur@stimuli.com.br> wrote:
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Commit hashes differ from local and remote
2011-04-15 15:26 ` Alex Riesen
@ 2011-04-15 15:41 ` Arthur Debert
0 siblings, 0 replies; 4+ messages in thread
From: Arthur Debert @ 2011-04-15 15:41 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git mailing list
Thanks Alex and John, this makes sense.
Cheers
--
Arthur Debert
www.stimuli.com.br
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-15 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 19:38 Commit hashes differ from local and remote Arthur Debert
2011-04-15 1:46 ` John Szakmeister
2011-04-15 15:26 ` Alex Riesen
2011-04-15 15:41 ` Arthur Debert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).