为什么PowerCmd显示重复的git提交?
我经常使用名为console2的windows控制台,最近发现了PowerCmd,所以我一直在尝试 我创建了一个Git存储库,并进行了三项更改。首先,请正确登录控制台2:为什么PowerCmd显示重复的git提交?,git,console,console-application,Git,Console,Console Application,我经常使用名为console2的windows控制台,最近发现了PowerCmd,所以我一直在尝试 我创建了一个Git存储库,并进行了三项更改。首先,请正确登录控制台2: c:\code\junk>git log --pretty=oneline 015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky. c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit 370e9cbb7
c:\code\junk>git log --pretty=oneline
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
C:\code\junk>git log --pretty=oneline
[33m015cfbec12208d7b719d523c92d0c46b726d42e6[m third time lucky.
[33mc8a9ffeb4381cd515a62937a0a50b7dc5360dbb8[m Second commit
[33m370e9cbb72feca9fb784843154f2171fefe2c656[m initial commit
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
我使用PowerCmd获得双倍的善:
c:\code\junk>git log --pretty=oneline
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
C:\code\junk>git log --pretty=oneline
[33m015cfbec12208d7b719d523c92d0c46b726d42e6[m third time lucky.
[33mc8a9ffeb4381cd515a62937a0a50b7dc5360dbb8[m Second commit
[33m370e9cbb72feca9fb784843154f2171fefe2c656[m initial commit
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
有人知道怎么回事吗
编辑:
尝试了一个建议,--没有颜色,,然后
C:\code\junk>git log --pretty=oneline --no-color
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
015cfbec12208d7b719d523c92d0c46b726d42e6 third time lucky.
c8a9ffeb4381cd515a62937a0a50b7dc5360dbb8 Second commit
370e9cbb72feca9fb784843154f2171fefe2c656 initial commit
太好笑了!我喜欢PowerCmd,可能只是不支持git。这些是(for),而PowerCmd似乎不支持它们(如前所述)
您可以尝试:
git log --no-color
这将允许您在不要求颜色时检查是否仍然存在重复提交
我检查过:即使我设置了TERM=msys
我让它正常工作的唯一方法是将stdout重定向到一个伪文本(,但实际上是一个伪文件)
我试过了,但没有成功——它让我觉得是在尝试做其他事情——我只是不知道是什么!>git——版本git版本1.9.4.msysgit。1@rtfminc我刚刚测试了Powercmd,问题就在这里。我找到了一种只获得一个输出(而不是两个)的方法,但这种解决方法并不实用。请参阅我编辑过的答案。是的,解决方法有效。很高兴不是我,我安装并删除了Ortoisegit,安装并重新加载了msysgit。谢谢你指出问题所在,我喜欢把事情弄清楚。:)