Stucked in the command line

Hello there,

And my additional question is : what to do or what key to press in order to get out of this (please see the file)? I understand that something is working, but even overnight it still continues to progress. I close it by closing the terminal window, but I think that this is not elegant

Thank you!

why are using vi? If you find vi ( a command line text-editor), you might want tell git to use nano instead (you can google how to make nano the default editor for git)

to exit vi, first type a colon (:), then type wq (write quite) or q! (quit without saving) and press enter.

yes, i will try out!
I type “git pull” in the command line, then I press enter and I get stucked in nano. I am not using vi, it happens by itself, something is wrong with “git pull”

like the file says, please enter a commit message to explain why this merge is necessary. Which is why you get the file.

Doesn’t like nano? Looks like vi. Nano should be easy to exit (ctrl + x if i remember correctly)

vi(m) seems to be the default:

so I would recommend changing the default editor.

it means I type colon (:slight_smile: then I press q
and then I type: git commit -m “merge necessary” enter

or you can type the reason why you merged directly in that file. But I am not going to cover vim, that is something you can find a tutorial for :slight_smile:

commit messages are there to remind yourself later (and others), why you made a merge. Merge necessary is not really a why.

so as I understand git pull command calls vim?!
I don’t understand how it could happen that I need something to merge? I always push from my local folder to GitHub, only one direction
and now If I want to push something the command line tells me I have to pull first, cause I have different commits,
I am not interested in vim, thank you for your previous key-tip ( if I am stucked in vim again)

no, it calls whatever command line text-editor you have configured. This behavior allows you to write a message as to why you merged.

And you are the only one working on the project? You might be able to figure out with git log to start seeing what you needed to pull. Although your command line should tell you after you merged and exited vim.

I started on git recently as well, following the directions for the Mac since I use debian linux (raspberry pi). I see that message open an editor, then I close it, and then see success anyway.

By the way, if you’re only using git on your system and not merging with anyone else, then just use git push when pushing updates.


just simple git push does not work, it seems that my remote and my local repository diverge in commits, i guess.
I tried to add my modified index.html file and I committed it and then I tried to push it and then I got the Hint: The updates were rejected because the tip of your current branch is behind its remote counterpart.
Please see the picture:

If I type git pull I get stucked, maybe iI should use the extended version of git pull?
I don’t know what was done remote, I am the only one user, I am confused.
Thanks for help in advance!

Hi stetim94,

Yes I did git log, and maybe you can take a look an the picture down?


Hey harrjt,

Unfortunately git push origin master didn’t work, maybe there is another solution?


you can just run:

git pull

git says the changes can be fast forwarded.

I did and then I had to select between Recovery Delete Edit Quit: First I selected Recover then I end up being stucked, then I did it again and I selected Delete

something happened,

Then I should commit and I simply typed git commit “complete merge” and then everything worked

So far I understand what was wrong, but still I am wondering about things which are executed via command line,

Thanks for helping me!

I have no idea. If i had a problem like that, i would use google to find out what might cause it. Even as a developer, you can’t know everything (That includes me)