我可以使用mSysGit和Cygwin的git吗? [英] Can I use mSysGit and Cygwin's git?

查看:210
本文介绍了我可以使用mSysGit和Cygwin的git吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

迁移到Windows后,我使用msysgit及其包含的bash shell,这对我工作良好。但我有问题:我的ant构建过程将不会运行在该shell,我想使用Cygwin的xterms而不是Windows命令窗口,因为终端兼容性不足以运行我想要的一切那个窗口,等等。

After migrating to Windows, I'm using msysgit with its included bash shell, and that's working well for me. But I have issues: our ant build process won't run in that shell, I'd like to use Cygwin's xterms instead of the Windows command window, since the terminal compatibility isn't good enough to run everything else I'd like in that window, and so on.

我实际上做了一个坚持使用msysgit在Windows命令shell,所以我不必使用单独的窗口构建,但是这有更多的问题:缺乏 cd - 和文件完成正在杀我,大多数命令我想管道是不存在等等。

I've actually made a go of sticking with msysgit in the Windows command shell so that I don't have to use a separate window to build, but that's got even more problems: the lack of cd - and file completion is killing me, most of the commands I'd like to pipe to aren't present, etc.

所以,如果我切换到使用Cygwin的git,或更糟的是,在不同的时间使用,是行结束会咬我?将Cygwin的git期望一切都 \\\
并认为它看到的变化,因为mSysGit转换为 \r\\\
退房时?将Cygwin的git检出为 \\\
并混淆我的Windows Eclipse,我相信一切都是 \r\\\

So if I switch to using Cygwin's git, or worse, use both at different times, are line-endings going to bite me? Will Cygwin's git expect everything to be \n and think it's seeing changes because mSysGit converted to \r\n when checking out? Will Cygwin's git check out as \n and confuse my Windows Eclipse, which I'm sure wants everything to be \r\n?

推荐答案

最简单的方法是设置任何git(msysGit或Cygwin git)忽略crlf

The simplest approach would be to set any git (msysGit or Cygwin git) to ignore crlf styles.

core.autocrlf=false

这样,你就没有不必要的冲突。

That way, you do not have ant unwanted conflict.

这篇关于我可以使用mSysGit和Cygwin的git吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆