github locks up mac terminal when using pull command

后端 未结 8 1681
清酒与你
清酒与你 2020-12-12 08:45

I\'m in the process of learning github on mac (command-line) and whenever I do git pull origin master i get this

# Please enter a commit message         


        
相关标签:
8条回答
  • 2020-12-12 09:06

    You're in the text editor, vim! It's a modal text editor, so you would need to:

    1. Press i to enter insert mode.
    2. Now you can type your message, as if you were in a normal (non-modal) text editor.
    3. Press esc to go back to command mode.
    4. Then type :w followed by enter to save.
    5. Finally :q followed by enter to quit.
    0 讨论(0)
  • 2020-12-12 09:06

    Make it simple.

    Type :wq and enter

    0 讨论(0)
  • 2020-12-12 09:08

    The editor looks like to be vim according to your descriptions. This console is simply telling you to write some message for the commit you want to make, and it is compulsory as it does.

    • Just type i and you'll go in the -- INTER -- mode, now you can write your comments.

    • After you have done writing, press esc key in your keyboard and you'll go to command mode. (see on the bottom of the console)

    • Now save changes by writing :w followed by pressing enter key

    • You can quit now by writing :q followed by pressing enter key

    • Hurray! Finally you're back to the main console.
    0 讨论(0)
  • 2020-12-12 09:08

    More simple is first ESC and then : x (lowercase).

    0 讨论(0)
  • 2020-12-12 09:17

    Problems usually happen when we misspell something.
    It is more likely this command you are interested in:

    git commit -m "message"
    

    if there was a problem, it might say something like

    Your branch and 'origin/master' have diverged,
    and have 2 and 1 different commits each, respectively.
      (use "git pull" to merge the remote branch into yours)
    

    and use:

    git pull
    

    which should lead to:

    Already up-to-date.
    

    Then it is good to check:

    git status
    

    and try pushing again:

    git push
    
    0 讨论(0)
  • 2020-12-12 09:18

    You can do git checkout --merge yourbranch

    A three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch.

    0 讨论(0)
提交回复
热议问题