Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
チェックインしたバージョンと競合するコードがクライアントにあります。Gitに「元のバージョンを無視して自分のバージョンを強制する」ように指示する方法はありますか?
はい、git push -fコマンドを使用してこれを行うことができます。この-fコマンドは「force」オプションであり、現在の履歴がアップストリームから取得されていない場合でも、現在の参照をアップストリームにプッシュします。
git push -f
-f
このコマンドを使用すると、簡単に作業を失う可能性があります。気をつけて。