4 ms·
With all these recipies - one thing I do whenever I attempt some stunt in git: I assign temporary tags to every changeset that's important. git tag tmp
by froh42 10y ago
With all these recipies - one thing I do whenever I attempt some stunt in git: I assign temporary tags to every changeset that's important.
git tag tmp
git perform-stunt
This eases undoing the stunt without needing to find the "before" state from reflog. And if you use a graphical log viewer (I like SourceTree on Mac) you'll see the tagged state in the history view - which makes things a lot clearer.
And to be aware what happens, there one single explanation of git that helps a lot: http://eagain.net/articles/git-for-computer-scientists/ http://eagain.net/articles/git-for-computer-scientists/
As soon as you start viewing git as a graph of nodes with branches/tags just being "marked" nodes a lot of things make sense, and whatever "git perform-stunt" you attempt it's easy to explain within that mental model.
- ramses0 10y agohttp://www.robertames.com/blog.cgi/entries/git-in-two-ten-minutes.html http://www.robertames.com/blog.cgi/entries/git-in-two-ten-mi... ... feedback welcome, but I feel like I go into a bit more depth using similar metaphors.