私は Git リポジトリに取り組んでおり、ブランチ (jviotti と呼ばれる) があり、変更がマスターにマージされました。さて、いくつかの変更をコミットした後、自分のブランチにプッシュできないことに気付きました。
$ 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 pullを試しました:
$ 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.
ここSOで同様の質問を閲覧した後、私は試しました:
$ git pull origin master:jviotti
From https://github.com/jorisbontje/pikapay-frontend
! [rejected] master -> jviotti (non-fast-forward)
それがうまくいくと思いました。私は何が欠けていますか?