Skip to content

Deletes all files if we try to git commit without staging files #751

@deepakmahakale

Description

@deepakmahakale

overcommit deletes all files if we try to commit without adding the files

Steps to reproduce:

1. Change a file
2. Do not `git add`
3. Try to commit 
    git commit -m "commit message"

4. Notice all the files have been deleted and staged 

The issue can be reproduced on this repository:

https://github.com/deepakmahakale/overcommit_issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions