项目作者: LussacZheng

项目描述 :
Build embeddable git for `git clone` and `git pull` on Windows. || 在 Windows 上构建嵌入式的 git 以用于 `git clone` 和 `git pull` 。
高级语言: JavaScript
项目地址: git://github.com/LussacZheng/git-embed.git
创建时间: 2020-06-15T14:52:07Z
项目社区:https://github.com/LussacZheng/git-embed

开源协议:MIT License

下载


| English | 简体中文 |

git-embed

platform
GitHub release
Latest version of Git
GitHub All Releases

Build embeddable git for git clone and git pull on Windows.

Usage

Download the latest re-packaged Git from Releases Page.

Build type

mini

The package “mini” is the minimum set of programs to run git clone and git pull on Windows.

It does NOT support HTTPS. But you could replace https:// with git:// while running git clone :

  1. # OK
  2. git clone git://github.com/LussacZheng/git-embed.git
  3. # It won't work
  4. git clone https://github.com/LussacZheng/git-embed.git

ssl

The package “ssl”, with all the contents of “mini”, contains some additional DLLs for HTTPS support.

  1. # Just use as usual
  2. git clone https://github.com/LussacZheng/git-embed.git

But the file size of “ssl” package (~16 MB) is much larger than that of “mini” (~5 MB).

Getting Started

In the released assets, take the “ssl” package (win64) as an example:

  1. $ tree
  2. .
  3. ├── bin # Binaries and DLLs of git
  4. ├── ca-bundle.crt # SSL CA file
  5. ├── git.exe
  6. ├── git-remote-http.exe # HTTP support
  7. ├── git-remote-https.exe # HTTPS support
  8. ├── libbrotlicommon.dll
  9. ├── libbrotlidec.dll
  10. ├── libcrypto-1_1-x64.dll
  11. ├── libcurl-4.dll
  12. ├── libiconv-2.dll
  13. ├── libidn2-0.dll
  14. ├── libintl-8.dll
  15. ├── libnghttp2-14.dll
  16. ├── libpcre2-8-0.dll
  17. ├── libssh2-1.dll
  18. ├── libssl-1_1-x64.dll
  19. ├── libssp-0.dll
  20. ├── libunistring-2.dll
  21. ├── libwinpthread-1.dll
  22. ├── libzstd.dll
  23. └── zlib1.dll
  24. ├── doc # Documentation
  25. ├── LICENSE # MIT license of this repository (git-embed)
  26. └── README.cn.md # README in Simplified Chinese
  27. ├── add-git-to-path.cmd # Just add `bin\` into the environment variable `%PATH%`
  28. ├── git.cmd #* Main entry point for `git` command
  29. ├── git-debug.cmd # Run `git` with debug info being printed first (Not `git <command> --verbose`)
  30. ├── LICENSE.txt # GPLv2 license of MinGit
  31. └── README.md # The file you are reading now

Note

  • Due to the syntax limitation of Windows batch files ( .cmd or .bat ), the absolute path of these files should not contain the special symbols, such as ()!@$;%^&.
    If it is unavoidable, please rewrite git.cmd in other programming languages. That is, complete the main functions of git.cmd with other languages, including setting environment variables and calling bin/git.exe .

Developer Instructions

Prerequisites

Build and distribute

Although the released packages is used for Windows, the building process can be carried out on Linux or macOS.

  1. # Clone this repository or directly download the source code
  2. git clone https://github.com/LussacZheng/git-embed.git
  3. cd git-embed
  4. # Install necessary dependencies
  5. npm install
  6. # Build and distribute
  7. npm run dist

Find the re-packaged Git archives in dist/ .

If you want to keep these packages, move them into dist/released/ to prevent them from being deleted during the next build.

MinGit

License

This program is distributed under the MIT license.

Notice: The scripts of this repository is used to re-package the released binaries of MinGit. MinGit is released under the GPLv2 license.

TODO

The current project is just in a state where it can just simply work.

  • Apply HTTP(S)_PROXY from the environment variables.
  • Automatically analyze DLL dependencies from Portable Executable (PE) files.
  • The exception handling is supposed to be improved.
  • Be able to build from a specified version of MinGit.
  • Make it became a command-line program.