You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-6
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ You can install this package using npm or your favorite npm package manager. If
35
35
npm install --save-dev portablegit
36
36
```
37
37
38
+
<sup>This package has a `postinstall` script</sup>
39
+
38
40
⚠️ **It's not recommended to install this package globally!**[Install Git for Windows normally](https://gitforwindows.org/) on your system instead. Interested in installing Git globally on more that just Windows machines? Check out [Git - Installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
39
41
40
42
🛑 Only works on Windows x64 systems. Does not work on macOS or Linux.
@@ -62,24 +64,29 @@ Available binary commands exposed through this npm package are:
62
64
-**`git-cmd`:** Starts a `cmd.exe` subshell preloaded with `git.exe` and other things in `$PATH`. Does **not** launch a new window.
-`tig`, `start-ssh-agent`, `start-ssh-pagent`, `scalar`, `git-receive-pack``git-upload-pack`: Extra things that I'm not not smart enough to understand.
68
+
69
+
This `portablegit` npm package is versioned to follow Git for Windows. For example, Git for Windows releases `v2.45.1.windows.1` (derived from Git 2.45.1) which this `portablegit` package releases as `2.45.11`. 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 `[email protected]` on npm. 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.
65
70
66
71
You can `import.meta.resolve()` or `require.resolve()` anything that would normally be in the extracted `PortableGit/*` folder. Here's an example:
This can be useful if you need to resolve the path to a specific binary (`cat.exe`, `cut.exe`, etc.) that isn't exposed by default.
83
+
This can be useful if you need to resolve the path to a specific binary (`cat.exe`, `cut.exe`, etc.) that isn't exposed by default. Note that you don't need to use the `.exe` suffix since Windows will helpfully add `.exe` when attempting to run the file.
You'll need a Windows computer to test this package locally. You can run `npm run build` to make sure everything looks good locally. `npm run generate` will check for a new Git for Windows PortableGit release and download it if it exists. Make sure you do this manually on each new Git for Windows release. You can subscribe to releases on the [git-for-windows/git](https://github.com/git-for-windows/git) repository.
90
+
You'll need a Windows computer to test this package locally. You can run `npm run build` to make sure everything looks good locally. `npm run generate` redownloads the configured version of Git for Windows PortableGit as a 7zip self-extracting archive.
91
+
92
+
Each new upcoming release will first be tried as a prerelease `-rc.N` first to make sure that everything is 99% guarenteed to work when autopublishing.
0 commit comments