git restore filename or git checkout filename
git restore --staged filename ( revert changes from staging area to working directory) git restore file name ( revert changes from working directory )
git reset HEAD~ ( to revert changes from local repo to working directory) git restore file name ( to revert chages from working directory )
we dont have direct way to do this .