git merge如何忽略部分路径
参考文章:
Git - Ignore files during merge
How to make git ignore a directory while merging
在进行git merge时,想忽略部分路径的回合。
如:将develop分支merge回master,但是忽略/path/to/folder路径
操作:
git checkout master
git merge --no-commit --no-ff develop
git reset -- /path/to/folder # 将想忽略的路径从暂存区去掉
git commit # 做提交
git push origin master # 推送到master