How to rewrite the general history of Git already on Github?

I continue to read about the dangers of distributing / reloading / correcting commits that are already passed on to your team members. If the team asks for this change, how will we do it?

Does everyone stop writing files and just one person overwrites the story, clicks on GitHub, and then allows everyone to pull + resume work?

+4
source share
2 answers

When we do Squash / Rebase / Amend, the git change history. So, we cannot click on the remote except force (-f) push, then the history of the remote branch will be replaced by the local history of the branches.

  • , YES. , .
+1

, git , git .

(, ), . , , . push -f origin master ( , )

. , . , - , , , .

0
source

Source: https://habr.com/ru/post/1662288/


All Articles