Gitエラーエラー
error: non-fast-forward updateerror: non-fast-forward update
プッシュによってリモートブランチの履歴が書き換えられるため、拒否されました。
gitlinuxwindowsmacos
このエラーの原因
ローカルブランチがリモートブランチと乖離しています。プッシュが単純な fast-forward(新しいコミットの追記)ではなく、リモートの履歴の書き換えを伴います。
修正方法
先にプルしてリベースします: git pull --rebase origin branch。そのあとでプッシュします。リベースや amend などで意図的に履歴を書き換えた場合は、git push --force-with-lease を使います (--force より安全です)。チームと調整せずに、共有ブランチへ force push しないでください。
関連するエラーコード
Gitエラー情報
Already up to date.Already up to date
マージまたは pull しようとしたブランチの変更はすでにブランチに含まれています。
gitlinuxwindowsmacos
詳細を表示 Gitエラーエラー
error: pathspec did not match any fileserror: pathspec did not match any files
指定したファイルパターンがトラッキング済みファイルにマッチしませんでした。
gitlinuxwindowsmacos
詳細を表示 Gitエラーエラー
fatal: shallow update not allowedfatal: shallow update not allowed
shallow クローンからのプッシュが、リモートが shallow アップデートを許可していないために拒否されました。
gitlinuxwindowsmacos
詳細を表示 Gitエラーエラー
fatal: Not possible to fast-forward, abortingfatal: Not possible to fast-forward, aborting
ブランチが分岐しているため、--ff-only での pull が失敗しました。
gitlinuxwindowsmacos
詳細を表示 Gitエラー情報
nothing to commit, working tree cleannothing to commit, working tree clean
コミットすべき変更がありません。作業ディレクトリは最後のコミットと一致しています。
gitlinuxwindowsmacos
詳細を表示 Gitエラー情報
No local changes to saveNo local changes to save
git stash がスタッシュ対象の変更済みトラッキングファイルを見つけられませんでした。
gitlinuxwindowsmacos
詳細を表示