Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pushing in Gitkraken, does it use force with lease?

Tags:

git

gitkraken

I use force push with lease quite often when rebasing in my work, I wanted to know if gitkraken, under the hood, when clicking on force push, does it run a force push, or force push with lease.

like image 818
kishikaisei Avatar asked Jan 30 '26 22:01

kishikaisei


1 Answers

It runs a bare and simple force push.

I am a big fan of rebasing, squashing and amending my own commits, all operations that require to force push. To clarify any doubt, I did a test to see if the force push was running with the lease option and it does not.

If you want to check it yourself:

  1. Clone your repository on two different folders: folder_A and folder_B
  2. Create a branch from one of the two repos, push it to origin, and make sure both repositories check it out.
  3. Go to folder_B, modify any file, commit and push.
  4. Go to folder_A, do not fetch modify any file, amend your latest commit and push.

You will see that the repository in folder_A will have overwritten any changes made from folder_B.

If you try to pull from folder_B you will see it is on a broken state as the commit it was referencing to has been destroyed.

EDIT: shortly after having tested this myself I sent an email to GitKraken, asking if the feature of pushing with lease was going to be enabled anytime soon. They said that they have multiple requests for it. Surely it will be interesting to check the situation in some time to see how it is proceeding.

like image 57
Alvin Sartor Avatar answered Feb 01 '26 13:02

Alvin Sartor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!