Open VulumeCode opened 10 months ago
Agree, at least there should be a "smart protection" by SM.
https://github.com/sublimehq/sublime_merge/issues/25#issuecomment-746467740 and some of the comments below target the same topic
Maybe git maintenance
mechanisms could be utilized way to build a solution for the core problem, if I get it correctly ("fetch" stuff, but not updating refs → if SM would check that, it could be done transparently and show it in the UI). Obviously, SM should not run this hourly only. @ratijas, as I you brought this up, too, do you also think that this could work?
Version info
Description
Sublime Merge makes it easy to get a false sense of security, by allowing the use of "push --force-with-lease" combined with "Automatic Fetching".
From the git docs https://git-scm.com/docs/git-push
Steps to reproduce
You rebase a branch.
Your friend also rebases the branch and force pushes.
Automatic Fetch happens.
You force push with lease, thinking it's safe. It completes successfully.
Your friend's changes are lost regardless.
Expected behavior
Only force push is available, so you'll only have yourself to blame.
Alternatively, the git docs explain ways to make it safe again, but I don't know how feasible it is to implement that.