News for hackers. Stuff that matters.
Re:GitTips by pjc50 on Monday August 15, 2016 @10:57AM (#12290831)
you'll sooner or later overwrite a coworker's push without a trace

This is the kind of thing that makes it hard to see why git has become the One True DVCS - you can not just overwrite history but actually lose other people's work quite easily (presumably the commit also vanishes from their repo when they next pull?)

Re:GitTips by K0nserv on Monday August 15, 2016 @11:00AM (#12290865)
I think that's an unfair characterisation of git. Pretty much everything you can read online recommends against force pushing and it's definitely not part of any workflow recommended to beginners. Even with a force pushed branch when the person whose work has been overwritten tries to pull the pull will get reject and they'll retain the local copies of their commits. It's possible to resolve this problem as long as the person with overwritten commit doesn't delete their local copies.

Force pushing is super powerful when you learn to use git properly, but it's also like a gun with no safety so it's easy to shoot yourself in the foot if you don't know what you are doing.

Re:GitTips by daxelrod on Monday August 15, 2016 @11:02AM (#12290876)
No, the commit doesn't just vanish when they pull. They'll be asked to reconcile their local repo with the diverged upstream.
Re:GitTips by depr on Tuesday August 16, 2016 @05:39AM (#12296366)
I agree, Mercurial is a lot better in this regard.