git 常见错误总结

  1. git push 时,报错如下
To https://g*********.git
 ! [rejected]            stage -> stage (fetch first)
error: failed to push some refs to 'https:/**.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

可以输入这个指令

git reset --hard origin/stage
然后在执行
git pull
就可成功
  1. 查看某个分支是从哪个分支拉取的
git log --graph

你可能感兴趣的:(git,指令,错误解决办法,git)