Force Push - CI/CD用語集の定義
force push(git push --force)は、リモートブランチをローカルの履歴で上書きし、自分の履歴にないリモートのコミットを破棄します。履歴を書き換えた後には必要ですが、他人の作業を破壊する可能性があります。
force push(git push --force)は、リモートブランチをローカルの履歴で上書きし、自分の履歴にないリモートのコミットを破棄します。履歴を書き換えた後には必要ですが、他人の作業を破壊する可能性があります。
force push(git push --force)は、リモートブランチをローカルの履歴で上書きし、自分の履歴にないリモートのコミットを破棄します。履歴を書き換えた後には必要ですが、他人の作業を破壊する可能性があります。
より安全な代替手段
git push --force-with-leaseの使用を推奨します。これは最後のfetch以降にremoteが動いていた場合にpushを拒否し、まだ見ていないコミットの上書きを防ぎます。
関連ガイド
Force-With-Lease - CI/CD Glossary DefinitionForce-With-Lease: Force-with-lease (`git push --force-with-lease`) is a safer force push that only overwrites…
Rebase - CI/CD Glossary DefinitionRebase: Rebase replays your commits on top of another base commit, rewriting their SHAs to produce a linear h…
Protected Branch - CI/CD Glossary DefinitionProtected Branch: A protected branch is a branch with rules that block or gate changes, such as requiring pul…