目前,我将VsCode配置为我的 git difftool
和 git mergetool
我的 ~\.gitconfig
文件看起来是这样的。
[user]
email = [email protected]
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
但是,当我运行 git difftool
,它会问我
Viewing (1/6): 'Repo\directory\someCode.cs'
Launch 'vscode' [Y/n]?
有没有办法一次性打开所有的差异文件?能在不关闭文件的情况下循环使用是很有用的,目前我把VsCode配置成git difftool和git mergetool。
我发现的简单方法是。
alias difftool="git difftool -y"
并保存它。source ~/.bashrc
终端上的。