Running MacOs High Sierra 10.13.4 and git version 2.17.0.
Here's my workflow:
git rm ./some/file.out
git status
see that the delete for ./some/file.out
is waiting to be committedls ./some/
and see the file has been deletedgit commit
and see message one file was deletedHowever:
git status
I see the file still there but untracked. git clean -df
on the untracked file it gets removed and doesn't return.I've also tried
rm ./some/file.out
git add .
then git commit
and see file deleted messagegit status
and shows file still present, but untrackedIt seems this just started happening recently.
Here's my git config:
credential.helper=osxkeychain
core.hookspath=/Users/myname/.git_hooks
core.excludesfile=/Users/myname/.gitignore
user.email=myname@somewhere.com
color.ui=true
color.branch=true
color.status=true
color.diff=true
color.interactive=true
color.grep=true
color.pager=true
color.decorate=true
color.showbranch=true
alias.pt=!git push -u origin `git rev-parse --abbrev-ref HEAD`
alias.co=checkout
alias.cob=checkout -B
alias.b=branch
alias.bd=branch -D
What could potential be going on--specifically, has anyone else seen something like this and found it to be git related?
Just deleting files (non-git repo files) in the terminal does not have this behavior.
Poked around my ~/.git_hooks
. Looks like a script being called in my ~/.git_hooks/pre-commit.d
folder is to blame.
Not sure what exactly the script is doing (or was supposed to do), but when I remove the script the git rm && git commit
functionality works as expected--no more files risen from the dead!