下git push時遇到被reject的錯誤
$ git push origin master
To git@github.com:${USR}/mvn-repo.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:${USR}/mvn-repo.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
只要先下git pull,在下git push就會正常了
$ git pull origin master
$ git push origin master
Reference:
rip747
沒有留言:
張貼留言