Skip to content

False Positive When A Pushed Commit Is Amended #93

@Kurt-von-Laven

Description

@Kurt-von-Laven

protect-first-parent reports an error once you amend a commit that has already been pushed to a feature branch even though this doesn't constitute a foxtrot merge.

Protect first parent..........................................................Failed
- hook id: protect-first-parent
- exit code: 1

[ERROR] Foxtrot merge

Maybe you deleted a commit that was already pushed.
Maybe you ran "git pull" without the --rebase flag.

A possible fix is to run these commands client-side before pushing:

    git fetch --all
    git rebase origin/pre-commit

Check the result with "git log --graph" before pushing again.

Perhaps a distinction should be made between the default branch and other branches?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions