Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support on Windows OS #29

Open
magnori opened this issue Apr 11, 2020 · 4 comments
Open

Support on Windows OS #29

magnori opened this issue Apr 11, 2020 · 4 comments

Comments

@magnori
Copy link

magnori commented Apr 11, 2020

Is git-toolbelt supported on Windows 10 machines?

@ernstki
Copy link
Contributor

ernstki commented May 8, 2020

@magnori There could be lots of ways of answering that.

Assuming you are using Git for Windows's Bash shell, with all the default options chosen during installation then yes.

If you are using Git in PowerShell, then no. The toolbelt utilities appear to be written in Bourne shell script, and this needs a Unix shell.

If you use the Windows Subsystem for Linux, then yes. But that is Linux running inside Windows, not Windows itself.

Getting it set up with Git Bash

You wlll need to move or copy the scripts from the git-toolbelt repository to a directory in your $PATH for this to work. Here's one way that's straightforward:

# in Git Bash (included with Git for Windows)
mkdir ~/bin
cd /path/where/you/cloned/git-toolbelt
cp git* ~/bin

# test it on the 'git-toolbelt' repository
git initial-commit

Be aware of this issue, which I couldn't find a solution for, but since you probably only care about the bin directory in the Git Bash shell, I don't see this as a problem in this particular case.

The active-branches subcommand from git-toolbelt isn't going to work for you (see #33), but the few others that I tried out worked fine. This has been fixed by #34.

@nvie nvie pinned this issue May 12, 2020
@nvie nvie closed this as completed May 12, 2020
@magnori
Copy link
Author

magnori commented May 12, 2020

@magnori There could be lots of ways of answering that.

Assuming you are using Git for Windows's Bash shell, with all the default options chosen during installation then yes.

If you are using Git in PowerShell, then no. The toolbelt utilities appear to be written in Bourne shell script, and this needs a Unix shell.

If you use the Windows Subsystem for Linux, then yes. But that is Linux running inside Windows, not Windows itself.

Getting it set up with Git Bash

You wlll need to move or copy the scripts from the git-toolbelt repository to a directory in your $PATH for this to work. Here's one way that's straightforward:

# in Git Bash (included with Git for Windows)
mkdir ~/bin
cd /path/where/you/cloned/git-toolbelt
cp git* ~/bin

# test it on the 'git-toolbelt' repository
git initial-commit

Be aware of this issue, which I couldn't find a solution for, but since you probably only care about the bin directory in the Git Bash shell, I don't see this as a problem in this particular case.

The active-branches subcommand from git-toolbelt isn't going to work for you (see #33), but the few others that I tried out worked fine. This has been fixed by #34.

I am using Bash shell from Git for Windows, in which case it looks like the Git-toolbelt should work.

@ernstki
Copy link
Contributor

ernstki commented May 17, 2020

@nvie, @magnori could one of you re-open this? There is no rev in Git Bash for Windows, which means that git-modified will not work there. See git-modified around line 124.

It's not so difficult to call tac instead (as appropriate for the platform, because macOS has no tac), and I can do a PR for that to close this issue again. Edit: tac (prints the lines of its input in reverse order) is not a substitute for rev (reverses its input character-wise, not line-wise). So this is still an open problem.

@nvie nvie reopened this May 17, 2020
@nvie
Copy link
Owner

nvie commented May 17, 2020

@ernstki Thanks for the offer, I would be in support of that and happy to accept that change! 🙏

ernstki added a commit to ernstki/git-toolbelt that referenced this issue May 17, 2020
- should allow toolbelt to run in Git Bash on Windows

- closes nvie#29 (hopefully)
@nvie nvie unpinned this issue Apr 12, 2023
@nvie nvie pinned this issue Apr 12, 2023
@nvie nvie unpinned this issue Jul 19, 2023
@nvie nvie pinned this issue Jul 19, 2023
@nvie nvie unpinned this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants