Re: unable to push

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 31, 2008 at 09:10:26AM -0700, david@xxxxxxx wrote:

> I created localmaster in an attempt to get things working again. I'll try  
> creating a new master branch... that does make it work again, thanks.
>
> what I'm not understanding completely is how I broke things in the first  
> place.

I'm not understanding that, either. You not only created localmaster,
but you deleted master. Did you maybe do a "git branch -m"?

> going back through .git/logs/HEAD it looks like I did a checkout HEAD^^^  
> and never properly recovered. should I have done a checkout master to get  
> things back on track? I had thought that I could do a checkout of an old  
> version, modify it, do a commit, and the commit would go on top of the old 
> HEAD and I could just keep going (the reason for doing this instead of a  
> reset is that I had already published the intermediate commits to the  
> public repo, so I didn't want to roll back the history, just get the old  
> version of one of the files)

I think you did eventually "recover" which is to say you ended up on the
localmaster branch. When you did a checkout of HEAD^^^, your HEAD became
"detached", meaning that you were no longer on any branch, but at a
specific commit (and there should have been a warning message mentioning
that).

When you make commits on a detached HEAD, your HEAD remains detached,
meaning that those commits are not on any branch. So when you did a
checkout back to some actual branch, those commits were "lost" (meaning
that no branch contains them, but they are still available by peeking
through the reflog).

But that shouldn't have had anything to do with the state of the master
branch; once you detached, you were purely operating on the detached
HEAD.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux