简体   繁体   中英

How to write in file the output from "tig show commit-1 commit-2 patch"?

I'd like to write into a file the output from tig show commit-97b061ff commit-59466662 patch

I tried tig show commit-97b061ff commit-59466662 patch >file.txt , but the file was empty. I expected that it would contain the patch actual.

How can I solve it?

If I'd want to save a patch I'd just do

git show $commit > file.diff

You can save the current view in tig with :save-view file.txt but it's for testing purposes - it adds a lot of additional internal information to diff lines, so if you were to use it you'd have to strip those off.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM