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

Git Squashing

Git Squashing

Kristi Byrnes

December 08, 2021

Transcript

5 slides
  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

More Decks by Kristi Byrnes

Other Decks in Technology