简体   繁体   中英

SourceTree merge ignore whitespace conflicts

Is there a way to tell SourceTree to always ignore whitespace "conflicts" during merges? Something like the command-line call:

git merge -Xignore-space-change

as described at Merging without whitespace conflicts .

SourceTree has an option for ignoring whitespace. It had added this option a couple of years back. You can visit this link for further info.

When in the File status or Log views, there's that gears dropdown below the file list (and right above the file changes). Click that and hit the Ignore whitespace option.

设置空白忽略设置的工具

Hope this helps.

SourceTree merge ignore whitespace conflicts can done by custom action.

I created the custom action shell script that perform similar action but ignore all space that i use everyday, but you can change the script line 8 git merge parma from -Xignore-all-space to -Xignore-space-change to fit in your case. You can download the sourcetree custom action script - merge ignore white space , call the script in your sourcetree and pass the parma $SHA

For the difference -Xignore-all-space and -Xignore-space-change , you can refer official git advanced merging book and git merge ignore whitespace answer here

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