git push to remote repository failed
阿神
阿神 2017-05-02 09:34:35
0
6
731

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!

阿神
阿神

闭关修行中......

reply all(6)
曾经蜡笔没有小新

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

小葫芦

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

我想大声告诉你


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

Ty80
  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.

Ty80

git push -u origin master -f

巴扎黑

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template