i had got the same error. Actually i tried to override the flutter Old SDK Package with new Updated Package. so that error occurred.
i opened flutter sdk directory with VS Code and cleaned the project
use this code in VSCode cmd
git clean -dxf
then use git pull