git rebase master, затем отправка исходной ветки приводит к ошибке без перемотки вперед

Я пытаюсь работать над своей веткой featureA, постоянно обновляя ее с помощью главная ветка.

Вот сценарий

git clone ssh://xxx/repo

git checkout -b featureA

$ git add file.txt

$ git commit -m 'adding file' 

$ git push origin featureA

, в котором пара новых коммитов отправлена ​​на главный сервер

git checkout master

git pull origin master

git checkout featureA

git rebase master

git push origin feature A
To ssh://xxx/repo
 ! [rejected]        featureA -> featureA (non-fast-forward)
error: failed to push some refs to 'ssh://xxx/repo'
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.

Как я могу выполнить перебазирование, не заставляя сервер принимать его?

7
задан ben39 20 January 2012 в 23:03
поделиться