Git Commit after merge opens VIM

I did a merge of 2 files and now Im trying to commit but it opens VIM with the following data and now I’m completely lost. (I have no experience with VIM)

Merge branch 'master' of nodester.com:/node/git/lolcoder/****-******

Conflicts:
        .gitignore
        server.js
#
# It looks like you may be committing a merge.
# If this is not correct, please remove the file
#       .git/MERGE_HEAD
# and try again.


# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#   
#       .project
~                                                                               
~                                                                               
~                                                                               
".git/COMMIT_EDITMSG" 19L, 521C                               1,1           All

What do I do from here?

  • Could I change my name and surname in all previous commits?
  • How to find remote full url of a specific file managed with git?
  • Git merge ignore spaces
  • setgid bit not preserved by git on new directory in `.git` folder?
  • Gerrit is and isn't up-to-date in the same time?
  • How to refresh git diff output in Vim
  • Here is the scenario:

    I had a node.js project on github, now I’m trying to push this to nodester’s git repo (so I now have 2 remotes for my project). But before I can push to nodester, I needed to fix 2 files that conflicted with the ones generated on nodester for me. I solved the conflicts with git merge -y and now I want to commit then push.

    This is the error I get when trying to push to nodester:

    Nodester!
    To git@nodester.com:/node/git/lolcoder/****-**************.git
     ! [rejected]        master -> master (non-fast-forward)
    error: failed to push some refs to 'git@nodester.com:/node/git/lolcoder/****-************.git'
    To prevent you from losing history, non-fast-forward updates were rejected
    Merge the remote changes (e.g. 'git pull') before pushing again.  See the
    'Note about fast-forwards' section of 'git push --help' for details.
    

  • How to share a git feature (or topic) branch with multiple developers
  • How to merge two commits when none of them is last?
  • fatal: cannot create directory at /root/wp-content/cache/page_enhanced/… No such a file or directory
  • How to manage multiple long running feature branches in Git?
  • trouble in using “git commit -a” command
  • git clone issues via an SSH proxied host
  • 2 Solutions collect form web for “Git Commit after merge opens VIM”

    Git is opening vim because your environment variable EDITOR is set to vim, and Git believes you need to provide a commit message for the merge operation, therefore it is opening an editor for you to type one in.

    You can fix this by changing your environment’s EDITOR variable to something you prefer, or by providing a –message “this is my commit message” argument after git merge -y

    If what you want is to perform the merge and avoid opening any text editor, you can add --no-edit to your merge command so that it won’t open the editor for the commit message.

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