相关疑难解决方法(0)

设置Notepad ++ Compare作为git中的diff工具?

有没有一种简单的方法来设置Notepad ++的Compare插件作为Windows上Git的diff工具?我不确定它是否可以从命令行调用,所以可能没有.

git diff notepad++

13
推荐指数
1
解决办法
1万
查看次数

Diff/compare从命令行启动的Notepad ++中的两个文件

如何从命令行启动Notepad ++,提供两个文件并使用diff/compare打开它?

notepad++

5
推荐指数
1
解决办法
6267
查看次数

如何在Windows上使用Cygwin中的diff和patch?

我在那里关注了很多文章,但我仍然不知道如何在Cygwin中使用diff和patch

这里我在Windows资源管理器中创建2个文件

origin.txt

one
two
three
Run Code Online (Sandbox Code Playgroud)

new.txt

one
four
five
Run Code Online (Sandbox Code Playgroud)

然后我diff -u origin.txt new.txt > file.patch结果这个

--- origin.txt  2013-03-21 15:53:20.062956800 +0700
+++ new.txt 2013-03-21 15:53:29.191869600 +0700
@@ -1,3 +1,3 @@
 one
-two
-three
\ No newline at end of file
+four
+five
\ No newline at end of file
Run Code Online (Sandbox Code Playgroud)

然后我patch origin.txt < file.patch显示错误

patching file origin.txt
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file origin.txt.rej
Run Code Online (Sandbox Code Playgroud)

怎么克服这个?这与Unix和Windows文件格式有关吗?

P/S:我正在使用CYGWIN_NT-6.1-WOW64和Windows …

diff cygwin patch

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

diff ×2

notepad++ ×2

cygwin ×1

git ×1

patch ×1