简体   繁体   中英

Unable to delete symlink from git

I accidentally committed a symlink in my git repo. When I deleted the file it linked to, and then deleted the symlink itself, I now get a generic error "Exception caught during execution of add command" if I try to commit the deletion in Egit. If I try to run git commit from the command line, I just get the output:

Changes not staged for commit:
typechange: /path/to/old/symlink

Why isn't git able to commit this change?

Deleting the file (even if it sa sym. link) should be done using git rm command. Eg git rm /path/to/old/symlink and then use git add --all before you can perform git commit

git rm /path/to/symlink
git add /path/to/symlink
git commit -m "your commit message"
git push orgin $YOUR_BRANCH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM