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?

  • Git - Get Current Working Copy Version
  • Combining multiple git repositories
  • How do I make Git use the editor of my choice for commits?
  • How to disable git 'Push Results' dialog in eclipse
  • putting - and -​- before switches in git commands
  • Can I make git-svn handle svn:eol-style?
  • 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.
    

  • Git-Credential-Manager-for-Windows also saves invalid credentials
  • How do I add file to remote Git repo (Github) without cloning the whole repo first
  • Difference between `git branch -f <branch_name> <hash>` and `git checkout <branch_name>; git reset --hard <hash>` under a clean working tree?
  • How to skip “Hit return to start merge resolution tool” and open mergetool automatically
  • Append ticket number using git commit hooks?
  • Setting diffmerge as visual Git difftool not working
  • 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.