4 ms·
Git is one of those technologies where it's super important to get a good grasp of how to internals work. Once you got that, it get easier to answer git questio
by remirk 6y ago
Git is one of those technologies where it's super important to get a good grasp of how to internals work. Once you got that, it get easier to answer git questions for others or yourself, and to read the documentation or man pages, as you know what is happening.
With how software devs use git, it's 100% worth it to read a good book on it.
- Mayzie 6y agoWhat book(s) would you recommend?
- boriselec 6y agohttps://jwiegley.github.io/git-from-the-bottom-up/ https://jwiegley.github.io/git-from-the-bottom-up/
- Tor3 6y agoThat's the one which quickly got me up and running with Git, and made it easier to get a feel for how to do things.
- javisst1 6y agoI think https://learngitbranching.js.org/ https://learngitbranching.js.org/ shows the internals of git's graph model quite nicely.
- funtkungus 6y agoI would also love to get some recommendation on git. I'm using the github desktop gui atm (very new to this world), but I'd like to start learning git. it is kinda intimidating.
- rgoulter 6y agoIf you're more about learning by trying things out, I enjoyed these two: https://learngitbranching.js.org/ https://learngitbranching.js.org/ (which presents a visualisation of the commit history) https://github.com/Gazler/githug https://github.com/Gazler/githug (nice for small exercises; although you kinda have to pay attention and not just 'game' your way through it).
- funtkungus 6y agothese are all really great. thanks everyone!
- passerby1 6y agoUse command line. Try creating playground repo and play with it. You can use github's private repos. Use separate accounts to emulate merge conflicts. Start with only those options you feel need: such as tags and so. Read about work models (git flow, and others). Try them in your playground repo. Basically it's impossible to learn something without trying and making mistakes, and analysing what went wrong. No failing - no success. You will get it, not that hard. Good luck!
- jlkuester7 6y agohttps://github.com/FredrikNoren/ungit https://github.com/FredrikNoren/ungit is one of my favorite Git tools. IMHO it is the perfect compliment to the command-line interface since it provides a nice visual model of your commit graph and branches. The graph is interactive so you can use the GUI for things like merging, rebasing, cherry-picking, etc (very nice for visualizing those changes). But at the same time, the Ungit interface mostly just stays out of your way unless you need it. It does not try to force you into a certain workflow or usage pattern.
- heavenlyblue 6y agoI am not sure that is true at all. It’s way more important to understand that git has 0 consistency of what the command name is and what object it manipulates. Git checkout can create both branches and files. Why? Wouldn’t it be easier to have two commands for checking out a file from a different branch and creating a new branch?
- oerpli 6y agoI thought they addressed this with "git switch". https://bluecast.tech/blog/git-switch-branch/ https://bluecast.tech/blog/git-switch-branch/
- gspr 6y ago> Git is one of those technologies where it's super important to get a good grasp of how to internals work. If you don't have time for a full book, I think Mary Cook's Git from the inside out is a wonderful start: https://codewords.recurse.com/issues/two/git-from-the-inside-out https://codewords.recurse.com/issues/two/git-from-the-inside...
- rednum 6y ago> Git is one of those technologies where it's super important to get a good grasp of how to internals work. In my opinion relying too much on user understanding implementation is a mark of bad design. I don't care about more advanced functionalities of git, on daily basis I have very simple workflow that I want to "just work". Sure I can spend few days studying git internals, but it feels unnecessary. Especially given that in the past I've worked with simpler proprietary tools that "just work" (though did not have equivalent of "power" features). On the other hand I think git is like bash - has some serious warts but it's good enough to be used widely; and unlikely to be replaced by anything else at this point.
- IshKebab 6y ago> Git is one of those technologies where it's super important to get a good grasp of how to internals work. That's just an excuse for Git being super confusing. Does Microsoft say "it's really important when using MS Word to get a good grasp of how its internals work"? Of course not. Yes you need to get a good mental model of how Git works (basically, commits are efficient snapshots of your code), but that's not the same as knowing its internals. Do you need to know about packfiles and loose refs etc? No, obviously not.
- thrwyoilarticle 6y agoSchoolchildren can write documents. They can't write software with many authors creating disparate, conflicting changes across vast space and time. Complaining that git is too hard is claiming this is easy.
- IshKebab 6y agoThe parts of it that involve Git are easy. By far the most difficult thing is resolving merge conflicts, but Git farms that out to third party software, and nobody here is talking about that. The core idea of Git - a DAG of repo snapshots - can be explained in like 5 minutes. I could explain all of the other operations in 5 more minutes. Maybe I should do a `Git in 10 minutes` video, but there are about a million of those already, and as I said, it wouldn't address the actual hard part of Git: the CLI.
- zests 6y agoI gained a lot when I learned the internals of TeX (of LaTeX fame.) Of course I did not learn _all_ of the internals. There's no need. Is (La)TeX super confusing? Sure. Is it what the pros use? Definitely. Also, read "The TeXBook", it is a masterpiece.
- blux 6y agoI agree in the sense that it is important to understand the underlying concepts of Git. Once that is clear in your mind, it becomes much easier to use. When I explain Git to other people I explain it as a tool for manipulating commit graphs, where every node in the graph is a (merge) commit with some unique hash, where a commit itself is just essentially a patch on the previous node(s) in the graph. Implementation details on how this commit graph is manipulated or stored behind the scenes are not important to understand Git in my opinion.
- nikital 6y ago> Git is one of those technologies where it's super important to get a good grasp of how to internals work. I fully agree, that's why I built a tutorial where you learn about Git internals by implementing Git yourself in Python: https://www.leshenko.net/p/ugit/ https://www.leshenko.net/p/ugit/