For example, sometimes when you are performing merge/pull you can catch:

error: unable to unlink old 'somefile' (Device or resource busy)

In this case git will be interrupted and it may have several files already created/modified by merging. So you need to remove/checkout this before resume:

  1. Checkout changes that were created by interrupted merge:

  2. Review new, untracked files that will be deleted (it should not have any that you want to save)

  3. Delete untracked files:

  4. Fix issue with Device or resource busy
  5. Rerun merge/pull