I am moving from one repository to another and need to port some of the changes. The directory structure is mostly the same but the files not all identical.
I am using 'git format-patch' and 'git am' or 'git apply' to port those changes. When it works, life is good, but when it fails because of some minor change or files missing, nothing gets applied.
开发者_如何转开发I can filter files out using --exclude, but what I really would like is that it applies as much as it can and just tell me where there are conflicts / failure.
I am also open to other option for applying the patches or things like that.
The --reject
option is probably what you're looking for. With that, you'll get classic .rej
files for failing chunks, while all the good chunks will be applied.
You could also try git apply --3way
.
精彩评论