2
dder
3y

!rant
To embrace the TIFO (today I found out)
$git rebase -i <hash>^

You can reorder commits and squash.
I just used it, to amend a commit that was not HEAD with some changes I’ve done later.

Comments
  • 1
    TIL? (Today I learned)
  • 1
  • 0
    @Root is that more widely known you think ?
  • 1
    @dder I think so. First time I’ve heard TIFO, at least.

    @Floydimus No ~

    Anyway, rebase is awesome. I don’t use it much, though. I don’t like the idea of losing history, even if it’s cleaner.
  • 1
    It was not pushed at the time.
    I agree having a clean history, but in this case I forgot to add a hunk to that one commit, cause it is logically attached.

    Oh and regarding TIFO

    https://devrant.com/rants/4415765/...
  • 2
    @dder that rant was the first time I ever saw someone use TIFO instead of TIL. Yours is the second.
  • 2
    When I'm working I usually commit everything in one bit WIP commit, and when the feature is done I use interactive rebase and interactive staging to separate logical commits. Perhaps one where I put the migration for adding background tasks, one for the feature itself and one for formatting fixes.

    Interactive staging `git add -i` lets you pick chunks of code rather than whole files and usually makes good guesses as to what the relevant code in one chunk should be.
  • 3
    @RagingCodeChimp That’s a great idea! I should start doing that.
  • 0
    @Root wow, thanks 😁 That means a lot coming from you, who to me are as close to an idol as this platform serves up.
  • 1
    @dder
    TIFO might be misunderstood as TIFU, I'd advocate.
    TIL thus more appropriate.
  • 2
    @RagingCodeChimp
    Contrary to popular opinion, I don’t actually know everything πŸ˜…
  • 2
    @Root well, omniscience is not a requirement, but a willingness to be open and share knowledge, experience and opinions, sometimes firmly, sometimes vocally, sometimes modestly, as well as actively participating in the community while showing a willingness to learn is really what it is about ☺️
Add Comment