如何使用 x.diff.txt 给项目打补丁?
How to use x.diff.txt patch a project?
我在 tmux 上开了一个问题 https://github.com/tmux/tmux/issues/1225
维护者告诉我
try something like this x.diff.txt then show tmux logs from -vvvv
x.diff.txt 是:https://github.com/tmux/tmux/files/1609045/x.diff.txt
看起来 git 不同。我认为这是一种补丁,但如何将此文件应用到整个项目?我只用了 tortoisegit 来解决冲突。
从https://www.devroom.io/2009/10/26/how-to-create-and-apply-a-patch-with-git/
学习git apply
针对我的问题
git clone https://github.com/tmux/tmux
cp x.diff.txt tmux & cd tmux
# take a look at what changes are in the patch
git apply --stat x.diff.txt
# test the patch before you actually apply it, no output means fine
git apply --check x.diff.txt
# If you don't own the project
git apply x.diff.txt
# If you own the project
git am x.diff.txt
我在 tmux 上开了一个问题 https://github.com/tmux/tmux/issues/1225
维护者告诉我
try something like this x.diff.txt then show tmux logs from -vvvv
x.diff.txt 是:https://github.com/tmux/tmux/files/1609045/x.diff.txt
看起来 git 不同。我认为这是一种补丁,但如何将此文件应用到整个项目?我只用了 tortoisegit 来解决冲突。
从https://www.devroom.io/2009/10/26/how-to-create-and-apply-a-patch-with-git/
学习git apply
针对我的问题
git clone https://github.com/tmux/tmux
cp x.diff.txt tmux & cd tmux
# take a look at what changes are in the patch
git apply --stat x.diff.txt
# test the patch before you actually apply it, no output means fine
git apply --check x.diff.txt
# If you don't own the project
git apply x.diff.txt
# If you own the project
git am x.diff.txt