git

103 阅读1分钟
合并 (master|MERGING)

执行 git reset --hard head


git 合并 fatal: refusing to merge unrelated histories

执行 git merge master --allow-unrelated-histories


git 提交 error: remote origin already exists.

执行 //1 git remote rm origin //2 git remote add origin 仓库地址 //3 git remote add origin gitee.com/xxxxxx.git //4 git push -u origin 分之名


git push -u origin "lihui"

To gitee.com/xxxxxx.git ! [rejected] lihui -> lihui (non-fast-forward) error: failed to push some refs to 'gitee.com/xxxxxx.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.


执行 git pull origin master 先同步 // 重新 add和commit相应文件 // git push -u origin 分之名


git # error: failed to push some refs to 'gitee.com/xxxxxx.git'

执行 git pull --rebase origin master // git push -u origin 分之名