Skip to content

Git squash commits even if merge fails #95

@sreeix

Description

@sreeix

I had a few merge failures when i git squashed my branch into master. I excepted it to leave the commit unmerged and let me merge and then push it myself. But in this case it just pushed broken code to the master with all the conflict markers.

It could be fixed by just checking the git merge result

Perhaps this code....

if [ $CODE -eq 0 ];then
echo "Merge Failed. Please fix it and do a git commit"
exit $CODE
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions