Command to open file with git

Git has nothing to do with how you open/edit files in your project. Configuring the editor in git is only so that git internal things that require an editor (commit messages for example) can use your preferred editor.

If you just want to open files from the command line (cmd.exe) as if they were double clicked in the windows explorer, I think you can use start <filename>.


I was able to do this by using this command:

notepad .gitignore

And it would open the .gitignore file in Notepad.

Tags:

Git