about the git patch

来源:互联网 发布:剃刀边缘网络更新时间 编辑:程序博客网 时间:2024/05/21 06:36

1.how to check out the patch from the commited code:

git format-patch [commit ID] -o [target_directory]


2.how to check the fomat of patch:

git log -g


3.how to check in patch:

git am *.patch


4.how to merge the patch:

repo sync .

git apply *.patch --whitespace=fix --reject

reveiw *.rej files, merge it by hand

rm *.rej

git add .

git commit -m "commit info"

0 0
原创粉丝点击