git apply a patch as much as possible when failing

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.

  • Is any body making a windows replacement to msysgit with libgit2,libgit2sharp, Ngit?
  • How can I move a directory in a Git repo for all commits?
  • Why does $GIT_DIR/info/exclude fail to negate a pattern defined by core.excludesfile?
  • Git shared repo on jail shell with single user, multiple developers
  • git branches and running programs
  • Composer pulling latest commits on separate repos
  • 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.

  • Git clone. key_load_public: invalid format Permission denied (publickey)
  • Git project is not recognized by xcode
  • Why does gitpython on windows always get file not found errors?
  • How to accept the 'Did you mean?' terminal/git suggestion
  • git diff --numstat with --name-status
  • Should I group these interdependent git projects?
  • 2 Solutions collect form web for “git apply a patch as much as possible when failing”

    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

    Git Baby is a git and github fan, let's start git clone.