4 ms·
I've completely replaced my use of --force with --force-with-lease. It does the same thing, except it will abort if the upstream branch has been updated since y
by tspike 4y ago
I've completely replaced my use of --force with --force-with-lease. It does the same thing, except it will abort if the upstream branch has been updated since your last pull. This pretty much prevents the concerns about clobbering others' work.
- dnsmichi 4y agoAfter reading this comment about "git push --force-with-lease" in https://stackoverflow.com/a/53011907/1821348 https://stackoverflow.com/a/53011907/1821348 my workflows with "git fetch" first would not work with "git push --force-with-lease", behaving as if "git push --force" was run. Theoretically - I need to do some testing here. Thanks for the pointer into learning something new :)