You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens in some cases that after the checkout of an branch the worktree is in unClean state.
If you want to reset this changes (withg Mode: git.HardReset) everything should be reverted.
BUT: If the modified file is also excluded in the .gitignore file then this file is not reverted.
If you run the command with the git console client (git reset --hard) all is reverted as expected.
The text was updated successfully, but these errors were encountered:
daolis
changed the title
Git reset hard does not reset modified files if they are excluden in .gitignore
Git reset hard does not reset modified files if they are excluded in .gitignore
Jul 28, 2023
daolis
added a commit
to daolis/go-git
that referenced
this issue
Jul 28, 2023
It happens in some cases that after the checkout of an branch the worktree is in unClean state.
If you want to reset this changes (withg Mode: git.HardReset) everything should be reverted.
BUT: If the modified file is also excluded in the .gitignore file then this file is not reverted.
If you run the command with the git console client (
git reset --hard
) all is reverted as expected.Test application to reproduce the issue: https://github.com/daolis/gogit-reset-bug
This behaviour was introduced with cf51e2febf37 #718
FYI @cbbm142 @pjbgf
The text was updated successfully, but these errors were encountered: