- git init
- git add .
- git commit -m “XXX”
- git remote add origin XXX
- git pull origin master --allow-unrelated-histories
如果此时出现Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with ‘#’ will be ignored, and an empty message aborts # the commit.等报错
可以进行如下操作:
1、按键盘ESC
2、输入:wq,然后回车即可。
- git push -u origin master