๐Ÿ”ถ Use Git for Windows via npm 
 ๐Ÿ‘จโ€๐Ÿ’ป Provides bash via Git Bash 
 ๐Ÿ’พ Uses a portable installation of Git & friends 
 ๐ŸŸฆ Only work

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-05-18 23:30:07

๐Ÿ”ถ Use Git for Windows via npm ๐Ÿ‘จโ€๐Ÿ’ป Provides bash via Git Bash ๐Ÿ’พ Uses a portable installation of Git & friends ๐ŸŸฆ Only works on Windows x64

You can install this package using npm or your favorite npm package manager. If possible you should use the user or global Git for Windows installation instead of this package.

โš ๏ธ It's not recommended to install this package globally! Install Git for Windows normally on your system instead. Interested in installing Git globally on more that just Windows machines? Check out Git - Installing Git.

You can use this package just as you would any other npm package that provides binaries! PortableGit only provides binaries for Windows.

This portablegit npm package is versioned to follow Git for Windows releases. For example, Git for Windows v2.45.1.windows.1 (derived from Git 2.45.1) would be released as portablegit@2.45.11 on npm. Note that there's a 1 suffix appended to the version number. Git for Windows v2.45.1.windows.2 would then be released as portablegit@2.45.12 on npm. The suffix is now a 2 just like .windows.2. For X.Y.0.windows.1 releases the npm-ified X.Y.01 version specifier is invalid; we need to drop the leading zero to create an X.Y.1 release.

You can import.meta.resolve() or require.resolve() anything that would normally be in the extracted PortableGit/* folder. Here's an example:

Leave a Comment