WANG LH , Research & Development

Git 命令参考

2021.05.31 22:05

push本地仓库到远程

git init
git add .
git commit -m "init project"
git remote add origin https://****
git push -u origin master

如果报错,需要先拉取远程仓库merge,再push
如果出现下面这个错误,fatal: refusing to merge unrelated histories 执行下面命令
git pull --allow-unrelated-histories