快速比對 修改的檔案 使用 Beyond Compare Filters & git & sed
修改 code 後,
想使用 beyond compare 比對 修改前後的 code (有一包未修改的 code),
若 code 很大,
全部比完,需要花很多時間,
Command
此時可以使用 git 與 sed 的命令,濾出修改過的檔案位置,
copy 濾出的結果 至 beyond compare 的 Fileters -〉include files,
直接拉出 比對 修改的檔案 (快速)。
git status -s | sed "s/.* //"
sed "s/.* //"
. --- 比對任何一個字元(但換行符號不算) /.n/ 可比對 “nay, an apple is on the tree” 中的 “an” 和 “on”,但不可比對 “nay”
* --- 比對前一個字元零次或更多次 /bo*/ 可比對 “Good boook” 中的 “booo”,亦可比對 “Good bk” 中的 “b”
再加一個空白,
整個是說在空白前(含空白)的pattern,都用 empty 取代。
Example
administrator@ubuntu:/media/d/workspace/update/linux_repo/kernel-3.18$ git status
Not currently on any branch.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: Makefile
deleted: README
modified: drivers/power/mediatek/Kconfig
Untracked files:
(use "git add <file>..." to include in what will be committed)
abc
no changes added to commit (use "git add" and/or "git commit -a")
administrator@ubuntu:/media/d/workspace/update/linux_repo/kernel-3.18$ git status -s
M Makefile
D README
M drivers/power/mediatek/Kconfig
?? abc
administrator@ubuntu:/media/d/workspace/update/linux_repo/kernel-3.18$ git status -s | sed "s/.* //"
Makefile
README
drivers/power/mediatek/Kconfig
abc

Reference
快速比對 修改的檔案 使用 Beyond Compare Filters & git & sed的更多相关文章
- C++ 檔案、資料夾、路徑處理函式庫:boost::filesystem
原帖:https://tokyo.zxproxy.com/browse.php?u=uG7kXsFlW1ZmaxKEvCzu8HrCJ0bXIAddA1s5dtIUZ%2FYzM1u9JI7jjKLT ...
- 在 Server 端存取 Excel 檔案的利器:NPOI Library
转处 http://msdn.microsoft.com/zh-tw/ee818993.aspx Codeplex 軟體套件(Package)資訊 套件名稱 NPOI 作者 tonyqus, huse ...
- 利用XSD配合XSLT產出特定格式Word檔案 -摘自网络
利用類別產生XSD檔 產出XSD檔的目的在於提供Word樣板設計之資料框架 在此使用微軟提供之XML Schema Definition Tool (Xsd.exe)工具產生XSD檔 1. 定義類別 ...
- C# 選擇本機檔案並上傳
參考自:http://www.dotblogs.com.tw/puma/archive/2008/11/07/5910.aspxhttp://www.codeproject.com/Articles/ ...
- 如何在 Visual Studio 2012 控制 TFS 版控時要忽略哪些檔案
幾乎在任何一種版本控管的機制裡,都會遇到那些「不應該簽入到版本庫」的潛規則,以往我們在用 SVN 的時候,我就寫過幾篇文章要大家注意這點.最近都改用 TFS 做版控,因為大多使用 Visual Stu ...
- [ASP.NET] 如何利用Javascript分割檔案上傳至後端合併
最近研究了一下如何利用javascript進行檔案分割上傳並且透過後端.特地記錄一下相關的用法 先寫限制跟本篇的一些陷阱 1.就是瀏覽器的支援了 因為本篇有用到blob跟webworker 在ie中需 ...
- [Python學習筆記] 抓出msg信件檔裡的附件檔案
想要把msg信件檔案的附件抓出來做處理,找到了這個Python 模組 msg-extractor 使用十分容易,但是這個模組是要在terminal裡執行,無法直接打在IDLE的編輯器上 所以稍微做了修 ...
- 何解決 LinqToExcel 發生「無法載入檔案或組件」問題何解決 LinqToExcel 發生「無法載入檔案或組件」問題
在自己的主機上透過 Visual Studio 2013 與 IISExpress 開發與測試都還正常,但只要部署到測試機或正式機,就是沒辦法順利執行,卡關許久之後找我協助.我發現錯誤訊息確實很「一般 ...
- Linux 下找出超過某些容量的檔案
找目前所在位置下,所有檔案大小超過3M的file,並列出檔名:大小 find . -type f -size +3M -exec ls -alh {} \; | awk '{print$9 " ...
随机推荐
- JAVA 修改环境变量不重启电脑生效方法
1. 在安装JDK1.6(高版本)时(本机先安装jdk1.6再安装的jdk1.5),自动将java.exe.javaw.exe.javaws.exe三个可执行文件复制到了C:\Windows\Sys ...
- 【整理】虚拟机和主机ping不通解决办法,虚拟机ping不通外网的解决方法
检查几个方面: 1.检查虚拟网卡有没有被禁用2.检查虚拟机与物理机是否在一个VMNet中3.检查虚拟机的IP地址与物理机对应的VMNet是否在一个网段4.检查虚拟机与物理机的防火墙是否允许PING, ...
- python 提交form-data之坑
#coding=utf-8 import requests from requests_toolbelt import MultipartEncoder #requests库上传 files = {& ...
- org.hibernate.AnnotationException: No identifier specified for entity: com.example1.demo1.Entity.User错误
最近在公司带人,他们问我的问题在这里也顺便总结下. 此项目为SpringDataJpa项目. 出现的错误如下: Caused by: org.hibernate.AnnotationException ...
- 转:获取GridView中RowCommand的当前索引行
获取GridView中RowCommand的当前索引行 前台添加一模版列,里面添加一个LinkButton 前台 (如果在后台代码中用e.CommandArgument取值的话前台代码就必须在按钮中设 ...
- NHibernate N+1问题实例分析和优化
1.问题的缘起 考察下面的类结构定义 public class Category { string _id; Category _parent; IList<Category> _chil ...
- mysql update连表
UPDATE price_air_item t1 LEFT JOIN order_item t2 ON t1.ORDER_ITEM_ID = t2.ORDER_ITEM_ID SET t1.BUYER ...
- Python学习-day8 socket进阶
还是继续socket网络编程的学习. socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None) Socket Fami ...
- LiveScript 函数
The LiveScript Book The LiveScript Book 函数 定义函数是非常轻量级的. 1.(x, y) -> x + y2.3.-> # an empty ...
- Leetcode with Python
1. Two Sum Given an array of integers, return indices of the two numbers such that they add up to a ...