Check the Create a commit even if merge resolved via fast-forward option at the bottom. From the popup that appears, select the commit you want to merge into your feature branch. Under Branches, double-click the feature branch that is behind to switch to that branch. Note: By default the code.cmd file contained a command line argument to open the CLI instructions "%~dp0.\resources\app\out\cli.js", and having this open each time was a bit tedious! I removed this so my file looked as follows, and now only the files sent from Sourcetree are opened. Click Show to expand the list of branches. Using the same command-line arguments as explainsįor me I was then able to use both diff and merge from Sourcetree. Setting "Custom" as the external tool for both diff and mergeĬ:\Users\\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd.I was able to set up with the following steps using the code.cmd script: SourceTree doesn't seem to consistently delete the intermediate files it creates, but you can select, right-click and 'Remove' them from the un-staged file section easily enough. mergetool 'sourcetree' cmd /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \'LOCAL\' \'REMOTE\' -ancestor \'BASE\' -merge \'MERGED\' trustExitCode true Or you could just enable 'Allow sourcetree to modify your global mercurial and git configuration files. When dealing with merge conflicts, you have to close the file when you're done to continue. Currently working custom merge options for WinMerge: The options I used in Sourcetree 3.4.3 for Windows 64-bit with WinMerge 2.16.10.0 圆4 and which worked for merging: Options > Diff > External Diff / Merge: Merge Tool: Custom Merge Command: C:\Program Files\WinMerge\WinMergeU. The '-n' flag makes VS-Code open a new window, which I prefer since VS-Code opens so fast, but you can omit it. The command-line arguments for Diff'ing are: The "Diff Command" in both cases is the path to wherever VS-Code is installed, eg:Ĭ:\Program Files (x86)\Microsoft VS Code\Code.exe.Choose "Custom" for the "External Diff Tool" and "Merge Tool". There may be other better variations, but after some experiment I've found these work well enough.
0 Comments
Leave a Reply. |