search

Home  >  Q&A  >  body text

git push to remote repository failed

As shown in the picture, I want to push the local warehouse to the remote warehouse. . As a result, he reported that the remote version was ahead of the local version.

Then I remoted to the local computer

Then it popped up another command like this.

Then after I selected, this interface appeared again. What exactly does this interface mean? Why do I need to enter some commands, but nothing comes out when I type on it? Can you explain what this interface does? Please guide me, thank you!

阿神阿神2807 days ago735

reply all(6)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-02 09:36:35

    Three steps of git, first commit, then pull, then push,

    reply
    0
  • 高洛峰

    高洛峰2017-05-02 09:36:35

    This interface is the interface for merging branches. Because the code you downloaded from the remote warehouse is different from the code in the local warehouse, git allows you to manually filter out the differences and finally commit

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:36:35


    This is the interface of the VI editor, http://baike.baidu.com/view/908054.htm
    is a command line text editor,
    This step of git is to enter comments
    No need If you modify the comment, enter a colon to enter the vi command mode, then enter x and press Enter to save and exit

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:36:35

    1. You cannot push because the remote repository is newer than the local one. If you want to push at this time, you must merge the new submissions in the remote warehouse with the local submissions and then push them to the remote warehouse.

    2. Then you execute the pull command, which is equivalent to fetch and merge, that is, fetching the content from the remote warehouse to the local one, and then merging it with the local content. Then the prompt in the second picture appears, the merged file already exists. Did you close the window directly during the merge process? It should be that the last merge was unsuccessful.

    3. This is for inputting commit information. After all, merging is also a commit. This interface is the vim editor. If you want to enter information here, you must first switch vim to editing mode and press the i key. After completing the input, enter ":x" to save and exit. Then the merge is completed.

    4. Now that you have merged the remote repository and the local submission, OK, execute the push command again to submit.
      5. You can first use a graphical interface client such as TortoiseGit, SourceTree or SmartGit. It is not too late to learn the commands after you are familiar with the basic process.

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:36:35

    git push -u origin master -f

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-02 09:36:35

    pull is unsuccessful, first execute `
    git pull --all

    reply
    0
  • Cancelreply