$ git push joe prod-2295-1 To git@git.com:joe.le/frontend.git ! [rejected] prod-2295-1 -> prod-2295-1 (non-fast-forward) error: failed to push some refs to 'git@git.com:joe.le/frontend.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. W510@W510-PC /D/git/frontend (prod-2295-1) $ git push -u joe prod-2295-1 -f Counting objects: 827, done. Delta compression using up to 8 threads. Compressing objects: 100% (188/188), done. Writing objects: 100% (456/456), 139.96 KiB | 0 bytes/s, done. Total 456 (delta 359), reused 343 (delta 267) To git@git.com:joe.le/frontend.git + 4bd5d08...cf736f4 prod-2295-1 -> prod-2295-1 (forced update) Branch prod-2295-1 set up to track remote branch prod-2295-1 from joe.
原因:自己分支版本低于主版本
解决:
$ git push -u joe prod-2295-1 -f