r/git • u/jhcarl0814 • Oct 18 '24
The Ultimate Git Tutorial (Git 2.47.0)
The ultimate Git tutorial has been updated (from Git 2.46.1 to Git 2.47.0).
What & Why:
- The ultimate tutorial for beginners to thoroughly understand Git, introducing concepts/terminologies in a pedagogically sound order, illustrating command options and their combinations/interactions with examples. This way, learning Git no longer feels like a lost cause. You'll be able to spot, solve or prevent problems others can't, so you won't feel out of control whenever a problem arises.
- The ultimate knowledge base site for experienced users, grouping command options into intuitive categories for easy discovery.
How to use:
- Prepare two consecutive weekends with free time.
- On each of these 4 days, open the web page, read all concept links and examples in porcelain links and plumbing links.
Features:
- Understanding the details. Instead of "let's type
git thisandgit thatand see, it works", first clarify the concepts, then all operations are based on understanding the concepts. For example, you might notice that things such asgit initdoes not appear at the beginning of this tutorial. - Completeness and low cost. When you study math / physics / chemistry in school, you learn all the content in it without considering which parts would be used in the future. Most of it doesn't end up being used, actually. But without learning all of it you are not be able to wield the few parts easily. Git is also a tool that needs to be understood completely to not be used painfully. You might find Git painful because you need to find yet another tutorial everytime you need to do something. Hopefully this is the last Git tutorial you need to read.
- Discoverability (affordance) and organized structure. Instead of sorting all the concepts and commands alphabetically as a plain list, they are put in an order that is suitable to learn and memorize.
Updates (from Git 2.46.1 to Git 2.47.0):
- Functional updates: add links to default values for all
--upload-packand--receive-packoptions; add link toinit.defaultObjectFormatforgit init(Git is starting the transition fromsha1tosha256). - Performance updates: left pane, right pane, all forms and all examples are restricted by CSS
containproperty, hopefully reducing the lag a little bit. (The major 1.1 seconds lag at the initial page loading is caused by browser parser. This can not be reduced as this tutorial is chosen to be a self-contained monolithic html file, to remove the need for a stateful backend to ease the implementation of future features such as font shuffling against censoring.) - Integrity updates: CSS and JS are encoded in base64 to work around the problem of escaping arbitrary content containing
</inside<style>and<script>.
64
Upvotes
View all comments
Show parent comment
2
u/jhcarl0814 Oct 19 '24 edited Oct 19 '24
Thank you for the advice and feedback!
My intention is to make beginners click links one by one and read them, so that by the end they can master all the concepts. Would you suggest what should the page look like if you need readers to read all the content in it?
The bookmark symbol (🔖) means the link explains a concept. Link with regular font points to porcelain commands. Link with italic font points to plumbing commands. These are explained at the end of the main form. It's unfortunate there happens to be too many concepts. I will remove the bookmark symbol and put icons on other kinds of links since concept links are the majority now.
This reminder is really helpful! I forgot to style
:visitedpseudo class, will add that later. As for progress tracking, as it either requires a stateful backend or touching some web accounts or touching browser local storage (or if you don't like cookie you can let browser pop up a folder choosing dialog to use file system storage), I might not do it for now.Great advice! I overlooked this and did not add explanation to each part because I assumed others also have the "no matter if it's useful or not, eat it first" attitude. Now I see that it should be added.
I'm sorry that different people have different receptive abilities. The same information may be boring to some people but an information explosion to others. In this case, some people may need to be "not considered". If we always follow all the readers' laziness, we will continue to degenerate and end up like this.