Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

jherland

2
Posts
A member registered Jun 16, 2021

Recent community posts

Also `git add -p` is a real super power for chosing exactly what to include in the next commit.

I think of `git rebase -i` as a way to create a "recipe" of git operations, aka. a "Git sequencer". Each line in the rebase instructions correspond to a separate git command you would otherwise run at the command line.

So if you have three commits : A -> B -> C, and you want to reorder B and C, you could either run these commands:

  • git reset --hard A
  • git cherry-pick C
  • git cherry-pick B

or you could run `git rebase -i A` (which basically says "I want to rewrite the history since commit A") and then edit the instructions to say:

  • pick C
  • pick B

The end result after this is exactly the same, but I find the rebase method easier when the number of commits grow large and/or I want to make other kinds of changes to the history (reword commit messages, squash commits together, etc.)