Git commands that could break/rewrite the history

前端 未结 4 1463
终归单人心
终归单人心 2020-11-22 05:51

Can you provide a list of (all, or the most common) the operations or commands that can compromise the history in git?

What should be absolutely avoided?

    <
4条回答
  •  一整个雨季
    2020-11-22 06:19

    From experience one of the most dangerous commands is

    git push -f mirror

    This mirrors your local repo onto remote in process removing all other branches other than the ones you have on your local repo.

提交回复
热议问题