我有我的本地開發分支機構(本地/ dev),原始存儲庫(origin/master)的主分支和我的遠程開發分支(remote/dev)。啓動時,本地/ dev和遠程/ dev同步。git rebase三個存儲庫
現在我想從origin/master獲取更改,使用我的本地/ dev重新綁定它並將其推送到遠程/ dev。
所以我在我的本地/ dev庫中執行了git pull --rebase origin master
,這似乎工作正常。
但git status
返回我:
On branch dev
Your branch and 'remote/dev' have diverged,
and have 8 and 5 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
和git push remote dev
將導致
To github.com:PascalTurbo/dev.git
! [rejected] logger -> logger (non-fast-forward)
error: failed to push some refs to '[email protected]:PascalTurbo/dev.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.
我怎樣才能解決這個問題?