Git reset and checkout by single command
I tried this one and works well for me:
git checkout HEAD -- path
I just added this to my .zshrc
/ .bashrc
checkout() {
git reset "*$1*"
git checkout "*$1*"
}
And then you can just do checkout <file>
and you're all set.