Add option during install to add git to path in Windows
See original GitHub issueDescription
Enhancement request. Add an option during install on Windows to add git provided by desktop to path. This will allow users to also use git from the command line. Also, it will satisfy Visual Basic Codes git check and will allow version control using git.exe provided by desktop from Visual Basic Code.
Current Setup
GitHub Desktop version: 1.0.11
OS: Windows 10 Pro
OS version: Microsoft Windows [Version 10.0.16299.125]
Steps to Reproduce
- Add
C:\Users\user\AppData\Local\GitHubDesktop\app-1.0.11\resources\app\git\cmd
to path
- You can now use git provided by desktop via powershell, cmd and even in Visual Studio Code
Additional Information
I’m sure this wouldn’t be something everyone wants as you can always install the actual git for windows, but that comes with some config choices. I know I would rather just install desktop to get git functionality in Windows. Since this is something not everyone would want, I’m thinking the best way to implement this would be via adding a checkbox option during install. Something along lines of add git to path.
Not sure this would really make sense on Linux or macOs. Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top GitHub Comments
@gmcclins thanks for the suggestion. We made a conscious decision back in the early days of GitHub for Windows to not tamper with your existing environment unless absolutely necessary, and this is one of those cases.
While it seems convenient to do this, it actually introduces a whole lot of problems:
GIT_ASKPASS
environment variable (details here), and simply adding Git to yourPATH
won’t get credentials working in your terminal or appPATH
environment variable correctly, and it would continually spawn the Desktop UI. I had to get them to remove this code in https://github.com/Microsoft/vscode/pull/35965We recommend installing Git for Windows and ensuring you check the “add to your
PATH
” option in it’s installer, as both Desktop and VSCode interop nicely with that.Thank you. This was helpful. saved to re-read for later configurations as well.