如何在Cygwin中获得Git 1.8?

mna*_*mov 41 git cygwin

根据http://cygwin.com/packages/git/,最新的Cygwin软件包是1.7.9-1.

我想将git更新到至少1.8.0.

我可以这样做吗?

Red*_*edX 46

cygwinports有许多新版本的各种工具

在我写这篇文章时它有1.8.3.4

新的简化安装说明:

  • 使用最新的Cygwin安装程序(至少版本2.829):32位的setup-x86.exe或64位的setup-x86_64.exe.(请注意,许多软件包尚未移植到x86_64.)
  • 使用-K标志启动setup - *.exe,例如:

    cygstart - /path/to/setup-x86.exe -K http://cygwinports.org/ports.gpg

  • 在"选择安装类型"页面上,选择"从Internet安装".

  • 在"选择下载站点"页面上,选择一个发行镜像,然后在"用户URL"字段中输入ftp://ftp.cygwinports.org/pub/cygwinports并按"添加"(确保两者都突出显示).
    1. 或者,您可以使用源软件镜像,但如果这样做,则必须使用托管在与所选发行镜像不同的服务器上的镜像.
  • 继续选择和安装包,确保安装任何指示的依赖项.

  • 为了避免超出您的讨价还价,请单击设置的"选择包"步骤中的"查看"按钮.安装程序默认更新所选站点(例如CygwinPorts)有更新的所有内容,而更新版本并不总是更好. (4认同)

Wil*_*uta 28

要安装,git 1.8.0您需要编译源代码.

您需要克隆git repository(git clone https://github.com/git/git.git),输入git目录,将当前版本更改为1.8.0或其他您想要的版本(git checkout v.1.8.0)并键入以下命令:

make configure
./configure --prefix=/usr/local
make
make install
Run Code Online (Sandbox Code Playgroud)

它将在/usr/local目录下安装git .有关git安装的更多信息,比如文档,您可以查看INSTALL本地化在git repository root 中的文件.


小智 7

我按照这些说明成功安装了git 1.8.4.474 ; 我正在运行Windows 7 64位,cygwin版本1.7.22(0.268/5/3)

  1. 运行Cygwin安装实用程序并确保安装了以下软件包:

    gcc
    autoconf
    curl
    libcurl-devel, required for http/https support 
                   (NOTE: this is an obsolete package, you will need to
                   uncheck "Hide obsolete packages" when selecting packages
                   to install)
    make
    libiconv
    python
    perl
    gettext
    
    Run Code Online (Sandbox Code Playgroud)

    您可能需要libiconv-devel和cygwin32-liviconv(参见Marek的评论)

  2. 使用git clone https://github.com/git/git.git克隆Git源代码.关于Git配置的一些注意事项:

    确保core.autocrlf=false,否则你最终会得到导致构建中断的DOS样式行结尾.

    我也有一个疯狂的http.sslcainfo财产价值; 要么取消它,要么指向它/usr/ssl/certs/ca-bundle.crt.

  3. 从新克隆的git仓库中,运行以下命令:

    make configure
    ./configure
    make
    make install
    
    Run Code Online (Sandbox Code Playgroud)