karzilla: a green fist above the word SMASH! (Default)
[staff profile] karzilla
In case anyone else finds this useful (and so I can easily look it up again later):

If you've already deployed a commit that you need to revert, you can get the changes you need in two quick steps:

1. git log -1 -p [sha] > [txtfile]

2. git apply --reverse [txtfile]

Then add and commit as normal.

In my case, I needed to back out two commits. Just make sure you apply the reversion for the newer commit first.




Also, hi! Since my last post here about Docker, I eventually wandered away from my attempts to get a Dreamwidth development container suite working. A DW install has a lot of moving parts that need to be able to communicate with each other, so my efforts to keep all the various services properly separated in their own individual containers quickly grew unwieldy. I might come back to that project at a later date, but for now I'm using a cloud provider to run my own development system on dw.kareila.net.

Date: 2022-11-13 06:42 am (UTC)
From: [personal profile] pinterface

Reverting commits isn't something I do very often, so I'm curious: what's the advantage of doing this versus something like git revert -n [sha]?

Profile

karzilla: a green fist above the word SMASH! (Default)
Karzilla, Destroyer of Bugs

November 2022

S M T W T F S
  12345
678910 1112
13141516171819
20212223242526
27282930   

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 15th, 2026 01:34 pm
Powered by Dreamwidth Studios