Skip to content

cpele/rewrite-commit-history-ide

Repository files navigation

Rebase Rewrite your commit history

Merge vs ❤️ rebase

2023-07-06 · Christophe Pelé · FuboTV

About merge and rebase

  • Merging is powerful, it gives you truth:

    Pasted image 20230706143546

  • Rebasing is powerful too! It gives you order:

    Pasted image 20230706143844

  • But rebasing also lets you do useful things like editing commits, removing them, squashing them, fixing them up...

Words

  • Git words
    • "Git" menu
    • Commit, push, pull, rebase, merge, rebase...
  • IDEA words
    • "VCS" menu
    • IDEA ⇒ Android Studio, GoLand, WebStorm...
    • Update project, commit, push
  • IDEA lets you use both
    • Try it!
    • Hit Shift key twice...
    • Then type git merge, git fetch...
    • Or type "update project"

Rebase rewrite history

  • It's useful to know Git words and commands
  • But not mandatory
  • IDEA lets you rewrite history
  • Not (always) mentioning rebase
  • Lets you rebase if you want
  • Keeps remote branch relatively safe
  • Makes it hard rewriting remote history

Demo

  • Easy stuff

  • Edit message

  • Drop

  • Squash

  • 😌 Prevent rewriting remote history

  • Video:

More demo

  • Rebase stuff

  • Fix-up

  • 🤩 Interactively rebase

  • Video:

About

How to rewrite commit history in an IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published