GIT からファイルまたはディレクトリを削除することについて言及している投稿がいくつかありますが、これらの変更をメイン リポジトリにプッシュする方法については説明していません。
たとえば、これはディレクトリを削除するのに問題なく機能しますが、この変更をメインの Git リポジトリにプッシュしようとすると拒否されます。
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to '/repo/project.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'non-fast forward'
section of 'git push --help' for details.
これを実際にメインリポジトリにプッシュし、実際にそのディレクトリを削除する最後のステップは何ですか?