拉取远程代码会遇到冲突
Git :fatal: refusing to merge unrelated histories
解决办法:
使用命令行拉去代码:git pull origin master --allow-unrelated-histories
执行命令后会有一个提示提交注释的提示(vim编辑器)
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
编写提交注释:
1. 在第一行输入理由:“更换远程仓库”,如果不是编辑模式可以按i键进入编辑模式
2. esc退出编辑模式
3. 输入“:w”保存输入
4. 输入“:q”退出
vim编辑器说明
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.