5
donuts
5y

Today, rebase finally made sense to me and I was able to squash a branch to remove a whole lot of unnecessary commits.

It only took 2 years... Guess all three times I used git in command line and all the Linux terminal/acting finally made a synergy.

Given I had to use force push that means it's like overwriting an existing repo with a different one?

Comments
  • 4
    Sort of, it rewrites the history of that branch, if someone else has pulled that branch their copy of it will be different (it still has the removed commits) and things can get really interesting if they have their own changes on that branch and want to push those.

    As a rule of thumb, never rebase a pushed branch unless you are 100% certain that noone else is using it.
  • 0
    @ItsNotMyFault well if they repull it would just remove the files, commits to match mines it so they need to locally delete the branch first?

    Yes pretty sure I'm the only one making changes to the branch. A lot of trial and error on it so squashed those bad commits. Created a file, made changes but in the end didn't need it so deleted it.
Add Comment