From 3f7bcba98428f62c18f2a2e31f378f6c7e3429be Mon Sep 17 00:00:00 2001 From: gisphm Date: Sat, 20 Jun 2015 19:13:12 +0800 Subject: [PATCH 1/3] add install.cmd for installation on windows The script install.cmd has two environment variables PREFIX and HTMLDIR. PREFIX is where your git is installed and HTMLDIR is the location of html files under PREFIX. This script is written for msysgit installed from https://github.com/git-for-windows/git. Signed-off-by: gisphm --- install.cmd | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 install.cmd diff --git a/install.cmd b/install.cmd new file mode 100644 index 0000000..7bf6709 --- /dev/null +++ b/install.cmd @@ -0,0 +1,27 @@ +@ECHO OFF +SET PREFIX=C:\SCM\PortableGit\mingw64 +SET HTMLDIR=%PREFIX%\share\doc\git-doc +SET GITEXTRAS=%~dp0 + +IF NOT EXIST %PREFIX%\bin MKDIR %PREFIX%\bin + +SET COMMANDS_WITHOUT_REPO=git-alias git-extras git-fork git-setup + +FOR /R %GITEXTRAS%\bin %%i in (*.*) DO ( + ECHO #!/usr/bin/env bash > %PREFIX%\bin\%%~ni + TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%~ni + TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%~ni + TYPE %GITEXTRAS%\helper\is-git-repo >> %PREFIX%\bin\%%~ni + MORE +2 %GITEXTRAS%\bin\%%~ni >> %PREFIX%\bin\%%~ni +) + +FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO ( + ECHO #!/usr/bin/env bash > %PREFIX%\bin\%%i + TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%i + TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%i + MORE +2 %GITEXTRAS%\bin\%%i >> %PREFIX%\bin\%%i +) + +ROBOCOPY %GITEXTRAS%\man %HTMLDIR% *.html + +@ECHO ON \ No newline at end of file From fd4fbd395007b8a36e06f95633c43edfbe3f62eb Mon Sep 17 00:00:00 2001 From: gisphm Date: Sun, 21 Jun 2015 01:06:45 +0800 Subject: [PATCH 2/3] format install.cmd Signed-off-by: gisphm --- install.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.cmd b/install.cmd index 7bf6709..3f76b2a 100644 --- a/install.cmd +++ b/install.cmd @@ -17,9 +17,9 @@ FOR /R %GITEXTRAS%\bin %%i in (*.*) DO ( FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO ( ECHO #!/usr/bin/env bash > %PREFIX%\bin\%%i - TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%i - TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%i - MORE +2 %GITEXTRAS%\bin\%%i >> %PREFIX%\bin\%%i + TYPE %GITEXTRAS%\helper\reset-env >> %PREFIX%\bin\%%i + TYPE %GITEXTRAS%\helper\git-extra-utility >> %PREFIX%\bin\%%i + MORE +2 %GITEXTRAS%\bin\%%i >> %PREFIX%\bin\%%i ) ROBOCOPY %GITEXTRAS%\man %HTMLDIR% *.html From 3707e2e82631eb69d855415d45f6a9b368c5d8c7 Mon Sep 17 00:00:00 2001 From: gisphm Date: Sun, 21 Jun 2015 01:59:41 +0800 Subject: [PATCH 3/3] added windows installation section in the Installation.md Signed-off-by: gisphm --- Installation.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Installation.md b/Installation.md index ade4ba3..1cd5180 100644 --- a/Installation.md +++ b/Installation.md @@ -26,3 +26,23 @@ One-liner: ```bash curl -sSL http://git.io/git-extras-setup | sudo bash /dev/stdin ``` + +## Windows (use it at your own risk) + +First, please install `Git for Windows 2.x` from 'https://github.com/git-for-windows/git/releases' +and the basic [msys2][1]. +Second, clone the `git-extras` repo into any folder you like. +```bash +git clone https://github.com/tj/git-extras.git +``` +After that, open the script `install.cmd` in the folder with any text editor you like. +Modify the `PREFIX` variable to where your `Git for Windows 2.x` is installed. +For example, I install it in the folder called `C:\SCM\PortableGit` and +the `PREFIX` should be `C:\SCM\PortableGit\mingw64` (for 64-bit release) +or `C:\SCM\PortableGit\mingw32` (for 32-bit release). +Third, execute the `install.cmd` directly or in the command prompt. +Last, please copy `colrm.exe` and `column.exe` from `folder-your-msys2-installed/usr/bin` to +`folder-your-git-installed/usr/bin`. +Enjoy `git-extras`! + +[1]: http://sourceforge.net/projects/msys2/ \ No newline at end of file