我正在使用Git存儲庫,我有我的分支(稱爲jviotti),我的更改已合併到Master中。 現在,在做出一些更改後,我發現自己無法推送到我的分支。合併分支後無法推送到Git存儲庫
$ git push origin jviotti
To https://github.com/jorisbontje/pikapay-frontend.git
! [rejected] jviotti -> jviotti (non-fast-forward)
error: failed to push some refs to 'https://github.com/jorisbontje/pikapay-frontend.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:
$ git pull
You asked me to pull without telling me which branch you
want to rebase against, and 'branch.jviotti.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.
If you often rebase against the same branch, you may want to
use something like the following in your configuration file:
[branch "jviotti"]
remote = <nickname>
merge = <remote-ref>
rebase = true
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
在所以在這裏瀏覽類似的問題後,我想:
$ git pull origin master:jviotti
From https://github.com/jorisbontje/pikapay-frontend
! [rejected] master -> jviotti (non-fast-forward)
我認爲這會做的伎倆。我錯過了什麼?
你試過''git pull origin jviotti''嗎? –
當你做'git branch'時,你看到了什麼? –