Closed MiguelGuedelha closed 11 months ago
I guess the reason is that nobody thought of users yet who would want to launch tig
from anything but Git Bash. You can work around this by calling:
git -c alias.tig=!tig tig
If you are interested in making it work out of the box:
sdk cd mingw-w64-git
,mingw-w64-git.mak
(to build cmd/tig.exe
in addition to compat-bash.exe
) and PKGBUILD
(to "install" cmd/tig.exe
) and create tig.rc
, imitating https://github.com/git-for-windows/MINGW-packages/commit/a1d0cf0580688d56aaf9b346051a364d4749d1ffmingw-w64-git
package via sdk build
pkg/mingw-w64-x86_64-git/cmd/tig.exe
to /cmd/tig.exe
, then prepending C:\git-sdk-64\cmd
to your PowerShell's $env:PATH
and calling tig
from there.I guess the reason is that nobody thought of users yet who would want to launch
tig
from anything but Git Bash.
Well, we kinda did, even before tig
. We added the Use Git and optional Unix tools from the Command Prompt
option a long time ago. These optional Unix tools
include tig
nowadays, but of course that option does come with it's own caveats.
of course that option does come with it's own caveats.
@rimrul you might say so... 😁
"Only use this option if you understand the implications" is quite scary a warning, and rightfully so.
@MiguelGuedelha I would strongly suggest to look into fixing this (follow the guidance I provided earlier). Not only would this help your use case, it would also help others and therefore make you an Open Source hero.
Hey @dscho, I have created a pull request that solves this issue, thanks to your directions. I tested it as well using this:
test in-place by copying pkg/mingw-w64-x86_64-git/cmd/tig.exe to /cmd/tig.exe, then prepending C:\git-sdk-64\cmd to your PowerShell's $env:PATH and calling tig from there.
and it works as expected. Hopefully this makes me an open source hero :)
In which version of Git for Windows will https://github.com/git-for-windows/MINGW-packages/pull/104 be included in?
I have git version 2.42.0.windows.2 here, but still no tig.exe
in cmd
folder.
And tig
command works in Git Bash, but still not in CMD or in PowerShell.
🙇 Sorry sorry sorry!
I have just seen it in some release notes. It seems it means that it will be release in upcoming 2.44 version, or something.
@jesus2099 please try the latest pre-release: https://github.com/git-for-windows/git/releases/tag/v2.44.0-rc1.windows.1
Thanks, I will!
Setup
No
Details
Powershell
The
tig
cli tool would runThe tig tool is not found by the OS.
The windows installation of git adds
<GitInstallDirectory>/cmd/
into the PATH buttig
is contained in<GitInstallDirectory>/usr/bin/
This is not so much a request/issue, but just trying to understand why this tool/path is not also added into the path during installation in order to spare extra manual steps, just to get this tool working globally in the terminal.