LoginSignup
1
0

More than 3 years have passed since last update.

絵で分かる git push --force-with-lease

Last updated at Posted at 2021-04-30

git push --force-with-lease の仕組み

git push --forceの代わりに安全なgit push --force-with-leaseを使おうとよく言われるが、内容をいまひとつ理解していなかったので絵に描いた。

force_with_lease1.png

git push --force-with-lease は絶対安全ではない

ただし以下のように他人が追加のコミットをした状態でも、git push --force-with-leaseが成功して、他人の追加コミットを消してしまうことがありえる。
git push --force-with-lease は絶対安全ではない
force_with_lease2.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0