Supper Thomas

Results 1023 comments of Supper Thomas

git pull --rebase 巧用git diff

如何显示两个branch之间文件名差异 你可以使用以下 `git` 命令来获取 `branch1` 和 `branch2` 之间差异的文件名及路径: ```shell git diff --name-only branch1 branch2 ``` 这个命令会输出 `branch1` 和 `branch2` 之间所有发生变更的文件的文件名及路径。如果你想要一个更详细的输出,包括文件差异的统计信息,可以使用 `--stat` 选项: ```shell git diff --stat branch1 branch2 ```

diff_files=$(git diff --name-only $base_branch..$compare_branch) # 对每个差异的文件进行处理 for file in $diff_files; do # 在这里添加你要执行的操作 echo "Processing file: $file" # 假设你要执行的操作是将文件复制到另一个目录中 cp $file /path/to/destination/ done

git diff --name-only 可以显示当前差异文件。

修改git默认编译器为vim `git config --global core.editor "vim"`

https://github.com/sisong/HDiffPatch

https://mp.weixin.qq.com/s/_P54jC6BwliWW-TEFXrUbA

https://mp.weixin.qq.com/s/IIXHviOaj2UEJ6CD45asFQ

1. WSL 安装: https://docs.microsoft.com/zh-cn/windows/wsl/install 先决条件 必须运行 Windows 10 版本 2004 及更高版本(内部版本 19041 及更高版本)或 Windows 11 如果是旧版的,比较麻烦 windows 必须是19041以上的才能运行比较方便 运行里面是输入‘winver’ 可以看到版本号。 2. powershell 管理员权限运行`wsl --install` 直接安装