Re:How to undo almost anything with Git (2015)
by hrgiger on Tuesday December 24, 2019 @03:04AM
(#21870628)
Here also my 'git from scratch' TODO for the new year list : https://wyag.thb.lt/
Re:How to undo almost anything with Git (2015)
by anongraddebt on Tuesday December 24, 2019 @05:09AM
(#21871009)
This looks great!
Re:How to undo almost anything with Git (2015)
by tomxor on Tuesday December 24, 2019 @08:02AM
(#21871742)
> The thing that made git click for me was to understand the data structures that make git work.
I cannot agree with this more! The data structure makes git git, there are some questionable CLI design choices but they all melt away once you get the data structure.
In relation to trying to manipulate commits and "undoing things", everything will be significantly clearer the faster you can move away from thinking of undo like a one dimensional word processor function... Instead start to think of git as an immutable graph of commit objects you are able to traverse, reference and use in anyway - at that point "undo" seems like a completely inadequate description.
Re:How to undo almost anything with Git (2015)
by de_watcher on Tuesday December 24, 2019 @04:20AM
(#21870863)
"understand the data structures that make git work" - insert relevant xkcd.
There's beauty and elegance in the implementation details of git. You can do and undo with confidence once you can translate the changes you want to make to git object transformations.
To get an overview of the concepts behind git I recommend this article by one of the GitHub founders: http://tom.preston-werner.com/2009/05/19/the-git-parable.htm...
To understand the data structures I suggest: https://codewords.recurse.com/issues/two/git-from-the-inside...