Put this file code
in C:\Users\<username>\AppData\Local\Code\bin
aside code.cmd
.
Assuming this path is already in your %PATH%
you can now run the command to open a file
code file.txt
Or open the current directory
code .
Meta: Open VS Code with Git Bash Open Visual Studio Code in Git Bash Open Visual Studio Code from Cygwin