On 2016-01-28 17:54, Thomas Segismont wrote:
If the Metrics repo wasn't your "origin" reference,
then:
"git push --force"
wouldn't have corrupted it.
huh, I did not know, origin works like this. FWIW, I stopped using
"origin" as a label of any remote, because I never knew what it was
pointing at. I started using "upstream" and "ppalaga". -- P
Then of course:
"git push --force upstream"
would have, but it's pretty clear in this case what you're doing.
I believe we are all actively contributing, and many of us (a majority?)
work in their own fork. What is it which you find complicated? It seems
you don't have your own fork so maybe you had troubles in the past with
another project?
As a bonus, working in your own fork avoids to keep useless branches in
the Metrics repo and building each commit twice on Travis.
Le 28/01/2016 15:51, Stefan Negrea a écrit :
> Hello Everybody,
>
> I did a mistake force push yesterday on the master branch of Metrics and wiped a few
commits. I was working on a PR and instead of force pushing the PR I did it on the master.
And we did not notice that until late today. This could have partially been avoid by me
working on fork. I do not like to work on a fork for the Metrics project because it is a
constant churn of branching, getting new code, merging since I actively work on a project.
But that by itself would not have avoided this force push at all. I knew about force push
protection feature in general but never thought about activating it. Thanks to Juca for
mentioning it in the channel.
>
> As a way to avoid mistakes like this in the future, I enabled force push protection
for the default branch on all Hawkular org repositories. This should have been enabled
from the start.
>
> For the future, I recommend enabling this on all new sub-projects. Also, if you have
other important branches in your sub-project please enable force push protection for all
of them. You can find this in Settings -> Branches -> Protected Branches -
http://snag.gy/GK4ic.jpg (thanks again to Juca for the screenshot).
>
>
> Thank you,
> Stefan Negrea
>
> Software Engineer
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/hawkular-dev
>
_______________________________________________
hawkular-dev mailing list
hawkular-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev