1
0
mirror of synced 2025-12-22 03:16:52 -05:00
Commit Graph

4 Commits

Author SHA1 Message Date
Sarah Schneider
cb12455649 ran script/content-migrations/use-short-versions.js 2021-06-24 10:21:07 -04:00
Grace Park
6f7e4f50dc updating content files 2021-06-14 12:06:52 -07:00
Yeikel
d9593f466b Suggest users to use --force-with-lease instead of --force
--force-with-lease is a safer and more recommended approach than --force


force overwrites a remote branch with your local branch.

--force-with-lease is a safer option that will not overwrite any work on the remote branch if more commits were added to the remote branch (by another team-member or coworker or what have you). It ensures you do not overwrite someone elses work by force pushing.

I think your general idea surrounding the command is correct. If the remote branch has the same value as the remote branch on your local machine- you will overwrite remote. If it doesn't have the same value- it indicates a change that someone else made to the remote branch while you were working on your code and thus will not overwrite any code. Obviously if there are additional commits in remote then the values won't be the same.

I just think of --force-with-lease as the option to use when I want to make sure I don't overwrite any teammates code. A lot of teams at my company use --force-with-lease as the default option for a fail-safe. Its unnecessary in most circumstances but will save you lots of headache if you happen to overwrite something that another person contributed to remote.

I'm sure you looked at the docs but there might be some more wordy explanation contained in here:

Read more : https://stackoverflow.com/questions/52823692/git-push-force-with-lease-vs-force
2021-05-26 13:15:25 -04:00
Sarah Schneider
f7e848e0c4 ran script/content-migrations/remove-map-topics.js && script/content-migrations/update-tocs.js 2021-05-19 10:12:38 -04:00