Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Squashing

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.

Git Squashing

Avatar for Kristi Byrnes

Kristi Byrnes

December 08, 2021
Tweet

More Decks by Kristi Byrnes

Other Decks in Technology

Transcript

  1. To squash or not to squash? Considerations – • What

    is the impact of a lost git history on the project? • Sharing branches between developers, should you rewrite someone else’s git history? • Do you need to keep that shared history between machines?
  2. Quick Reference git log --oneline git rebase –i HEAD~N -Show

    log of all commits on branch git commit --amend || git commit --amend --no-edit --amend: Update previous commit to contain new changes --no-edit: will keep previous commit message git push --force --force required to rewrite git history to update commit
  3. Food for Thought •https://learngitbranching.js.org/ • Interactive game experience to learn

    branching, rebase, and merging •https://chris.beams.io/posts/git-commit/ • Git commit message •https://www.themoderncoder.com/combining-git-commits-with-squash/ • Squash references with video •https://medium.com/@tedwu_55861/how-to-git-rebase-like-a-boss-c90abe110e95 • Rebase information