Skip to content

"No such file or directory @ rb_sysopen" while amending to rename a file #219

@eleather

Description

@eleather

Problem: Leo was amending a commit. His original commit added a file. His amend renamed that file. Overcommit was trying to run on the original file, which no longer existed (because it had been renamed).

Solution:

git stash   # stash current changes
git reset HEAD^   # reset commit he was trying to amend
rm <file that was renamed>
git add -p
git commit   # Use original commit message from gerrit, including change-id
git stash pop
git add -p
git add <new name for renamed file>
git commit --amend

This seems related to #146.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions