Found a swap file by the name “.git/.MERGE_MSG.swp”

I tried to pull origin branschName

and got this strange error:

  • Git (1.8.1.2) error when adding interactively
  • splitting a merge in git
  • git submodule update fails with error on one machine but works on another machine
  • IntelliJ Git Integration - git --version empty output
  • How to add private github repository as Composer dependency
  • How do I “un-revert” a reverted Git commit?
  • error: There was a problem with the editor 'vi'.
    Not committing merge; use 'git commit' to complete the merge.
    
    
    E325: ATTENTION
    Found a swap file by the name ".git/.MERGE_MSG.swp"
              owned by: eladb   dated: Tue Aug 20 10:52:03 2013
             file name: ~eladb/MyWorkspace/Client/.git/MERGE_MSG
              modified: no
             user name: eladb   host name: Elads-MacBook-Pro-2.local
            process ID: 29959 (still running)
    While opening file ".git/MERGE_MSG"
                 dated: Tue Aug 20 10:53:11 2013
          NEWER than swap file!
    
    (1) Another program may be editing the same file.
        If this is the case, be careful not to end up with two
        different instances of the same file when making changes.
        Quit, or continue with caution.
    
    (2) An edit session for this file crashed.
        If this is the case, use ":recover" or "vim -r .git/MERGE_MSG"
        to recover the changes (see ":help recovery").
        If you did this already, delete the swap file ".git/.MERGE_MSG.swp"
        to avoid this message.
    
    Swap file ".git/.MERGE_MSG.swp" already exists!
    [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
    

    how to fix this?

  • git clone without project folder
  • github non fast-forward error
  • Copy a git repo without history
  • How can I view the git history in Visual Studio Code?
  • How to go back to the last commit in the history after I used git reset to go to an older changeset?
  • What are the various branches in a github “project page” cloned repository?
  • One Solution collect form web for “Found a swap file by the name “.git/.MERGE_MSG.swp””

    It seems that a swap file created by vi has been somehow left undeleted.

    Remove .git/.MERGE_MSG.swp and attempt the git merge again.

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