0

Seeing something weird I cannot figure out. Another programmer (so I did not watch what was done) pushed a set of files. When I look at the source files in Assembla, the latest (expected) revision is shown on a file (last alpha-numeric at the end of the line):

BlastsController.php 2014-08-12 [name] Ticket # 61  e0af705fff

But when I click on BlastsController.php, the new code is not there, nor does it pull down with a git clone. This is all in HEAD. There are no additional branches.

If I click on the revision string itself I get a diff view between the revision shown and the previous... so the new code is there in some capacity. And when I do a git log on a fresh clone, the file shows one one commit. Yet if that was true, the new code/revision would not be in Assembla at all.

How could the revision I expect show up (which I assume means it was the latest checked in), but somehow it is not the one pulled down in a clone but some other revision?

gturri
  • 13,807
  • 9
  • 40
  • 57
Bill Ryder
  • 133
  • 1
  • 8
  • Which branch is the latest commit in, and what is your git clone statement? – Greg Burghardt Aug 13 '14 at 19:52
  • Branch is master. Clone is: 'git clone git@git.assembla.com:repo_name.git' Thanks! – Bill Ryder Aug 13 '14 at 20:02
  • There is only a master. No other branches at this time. I called it "HEAD" above. CVS days... – Bill Ryder Aug 13 '14 at 20:04
  • Not 100% sure, but I think whoever pushed the code was in a detached head state. I was able to pull the commit using the sha1, and then *I* was in a detached head state. So I'm going through pointing my HEAD at a branch (see: http://stackoverflow.com/questions/5772192/git-how-can-i-reconcile-detached-head-with-master-origin) and merging back into head. So I think the developer must have screwed up a git checkout trying to update a local file, ended up in a detached head state, and then done pushes. – Bill Ryder Aug 13 '14 at 20:55
  • The thing to note, and maybe I'll write them about it, is Assembla did not handle this well. Their GUI just showed a new revision under the master branch. But then you go to clone and the revision doesn't make it down. No explanation, nothing. Nothing indicating the code was from a detached head. It didn't know what to do with it so it just showed the revision under "master" even though it wasn't really in master. – Bill Ryder Aug 13 '14 at 20:55
  • `HEAD` can refer to any branch -- the branch you are currently on. But since it's in the master branch, I'm not sure why you can't get it from a git clone. It might be good to check the `.git/config` file in your local clone to see if the remote tracking branch is set up correctly for master. – Greg Burghardt Aug 13 '14 at 20:55

0 Answers0