Re: Newbie grief

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

 



On 5/4/12 1:45 PM, Felipe Contreras wrote:
It doesn't matter how you look at it; 'push -f' is not ideal.

Push -f offers an alternative that is available in other source code control systems, (not just mercurial), but not in git. It's a bit of a culture shock to discover that it's not available in git.

In the git world there's many ways to resolve this; push to another
branch, push to another repo, allow ssh access to your machine, send
the changes by mail, copy the git repo to a shared location, etc.
*All* of those alternatives are better than 'push -f'.

In your opinion, and that's fine. I don't need to argue this point any longer. All of those other solutions are also available in the other source code control systems too.

It seems to me that this *huge* thread basically boils down to Rich
wanting 'hg push -f', when clearly that just creates problems, even in
mercurial.

Actually, I wanted a work flow that was functional for me and supported a shared branch between multiple repositories. I think I have a process for that now. The key things I've learned so far are:

* Git can't cope with repository collisions, (in essence, because it's not willing to ever create multiple heads, but also because it doesn't track the entire pedigree of a branch, and because destructive rewrites on the repository are common in typical git usage).

The usual way to deal with this in the git world is to use geographical branches and triangles everywhere, but using "merge before push" can provide a way to use shared branches within git, (provided you can live within a fair number of restrictions, which I probably can.)

* That that cryptic message means that git would need to cope with a repository collision, which it can't do. It doesn't actually mean that the repository is corrupt, which is what I took it to mean.

Frankly, if the cryptic message had been clearer, I probably would never have posted here. I'd likely have figured out that git had this restriction and found a way to work around it on my own.

--rich
--
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]