This book teaches Git in a simple, visual, and tangible manner so that you can build a solid mental model of how Git version control works. Through the use of color, storytelling, and hands-on exercises, you will learn to use this tool with confidence.
The information is introduced incrementally so that you don’t get bogged down with unknown terms or concepts. Learning Git is ideal for anyone who needs to use Git for personal or professional projects: coding bootcamp students, junior developers, data professionals, and technical writers, to name just a few!
This book covers how to:
Download Git and initialize a local repositoryAdd files to the staging area and make commitsCreate, switch, and delete branchesMerge and rebase branchesWork with remote repositories including cloning, pushing, pulling, and fetchingUse pull requests to collaborate with others
From the brand

Explore Git & Github resources
More from O’Reilly

Sharing the knowledge of experts
O’Reilly’s mission is to change the world by sharing the knowledge of innovators. For over 40 years, we’ve inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
Publisher : O’Reilly Media
Publication date : June 20, 2023
Edition : 1st
Language : English
Print length : 317 pages
ISBN-10 : 1098133919
ISBN-13 : 978-1098133917
Item Weight : 2.31 pounds
Dimensions : 7 x 0.75 x 9.1 inches
Best Sellers Rank: #80,631 in Books (See Top 100 in Books) #11 in Software Design Tools #45 in Software Development (Books) #51 in Internet & Telecommunications
Customer Reviews: 4.6 4.6 out of 5 stars (82) var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });
12 reviews for Learning Git: A Hands-On and Visual Guide to the Basics of Git
Add a review
Original price was: $45.99.$34.92Current price is: $34.92.

Moses –
I finally got over it!!
For years, I have worked with Git sparingly, failing to use many of its features. This book has pushed me to become a more confident Git user than I was previously. The book begins with some very basic commands for a Linux/Unix environment. The assumption is that users will use such an operating system as their base system. However, the book also covers other environments, such as Microsoft Windows, and guides users through installing Git.This book presents concepts like merging (fast-forward and three-way), addressing merge conflicts, branching, and Fetching and cloning in a very simple yet hands-on way. Moreover, it provides a practical approach to pull requests that is built into hosting services such as GitHub and Bitbucket.Strengths:1. The book is written in a very simple way. The style emphasises a motivation for a concept by creating a book chapter. Then, reasons are given for why the concept is important.2. Commands are bold. This allows readers to quickly scan for important commands, in case one needs a quick reminder.3. Diagrams are intuitive, yet powerful. Each diagram presented in a chapter is an accumulation of activities from the previous chapters. That offers a seamless connection between all chapters.Weaknesses:1. This book’s pages are fragile. One has to be careful flipping pages.2. This book lacks end-of-chapter exercises. Although the hands-on approach in each chapter is practical, some users could further solidify concepts with end-of-chapter review questions.I would recommend this book to anyone desirous of learning Git. I have overcome my fear of Git thanks to this well-written book. Merging, merge conflict resolution, rebasing , branching, and cloning have become second nature.
Works for me –
Excellent book
An excellent way to learn GIT. It is very easy to follow as you progress through the book. Works for me.
Nick –
Step by Step, Simple and Clear Guide to How Git Works and How to Use It.
This book showed me step by step how git works and how to use it. It was simple, clear and its diagrams where useful. I liked that it gave enough conceptual understanding of what git was doing.
Alex –
Teaches the fundamentals of Git in a quick and enjoyable way
I use Git in my job, but I did not come from a computer science/software background. Using git and bitbucket were hurdles that I needed to pick up on-the-fly, but I ran into a problem that most of the online Git resources were challenging at best to understand.I thought about purchasing the book *Version Control with Git*, but I saw its 400+ page length and topics in the glossary and decided to wait for this newer book to be released. I was looking for a slimmer book which would teach me 90%+ of what I needed to know for using Git on the job – not advanced DevOps topics. Basically, I needed to learn enough to know the basics and be able to Google whatever else I needed.In this regard, the book is a spectacular success. I read through it over the course of a weekend and worked through the examples. The rainbow project is a very effective way to teach you the inner workings of Git and to build a mental model of what you’re doing. You’ll cover the basics of local repositories – what a git repository is, how to set one up, how to make changes with commits, what “HEAD” is, the different types of merges. Next, you’ll learn about remote repositories, how to set one up in GitHub/BitBucket, pushing/pulling commits, remote and remote tracking branches, what “origin” is, cloning and fetching, resolving merge conflicts, and lasting how to perform a pull request.Nothing in here is too advanced, but it’s the bread and butter of using Git in an industry setting, and it’s exactly what I needed. Moreover, it helps that the book is beautiful to look at, the colorful rainbow diagrams are quite fun, and the colored font helps bring attention to keywords and commands.The only, minor, complaint I have for the book is that I wish Anna had discussed forks in the Pull (merge) Request chapter. In most companies, there will be privileged access to the production repo, and you will probably not be able to branch off of it directly. Instead, you’ll need to make a fork, push your changes, and then do a repo-to-repo PR. I’m sure this book has taught me enough to easily google what I need, but it’s the topic most industry users of Git will encounter which is not in this book.Overall this is an excellent book, and I highly recommend it.
Neil –
Fantastic Git Fundamentals + Mental Model Book
Great book to learn about the most important components of git and develop a solid mental model of the git workflow. The visual teaching style and diagrams really help to enhance the learning experience and build the foundation for a clear mental model. This book covers all of the main features of git from local and remote repositories to different ways of integrating changes and pull requests. All in all this is a fantastic book for anyone interested in learning the fundamental ideas of git in a visual and engaging learning style.
Kindle Customer –
Easy to learn
Not sophisticated, but simple and easy to follow.A good starting point for learning the basics.I’m looking for a next level book.
Bernard L. T. Ong –
Great introduction to git
An easy book to read. Simple yet great exercises to follow to understand git. The visual graphical images were fantastic to understand the concepts.Good enough to begin with git with commonly used git commands and workflow.Book length was just right to keep my attention. Every chapter began with a recap from the previous chapter and state of git. All exercises are connected. The appendix also gave set up steps for each chapter if you wanted to recap from a particular chapter.Thoroughly enjoyed this book. Well thought through.
*********2018 –
Das Buch hat meinem Mann sehr gut gefallen.
RC –
The first thing I want to say is that beyond the topic of the book, the way this masterpiece is written is absolutely outstanding. So much so, that I think that if books on other subjects were written in the style of this book, the world would be a different place.I read the book in less than a week, completing all the exercises, and I think it was because the author wrote it carefully, with no rush, and with the beginner in mind. I enjoyed every page of it. It is so well written that everytime I read something and I had a question like “But, what if….”, the author answered that question in the very next lines. “What was that definition, again?”, and there it was the author, gently recalling the definition. Seriously, the author wrote this book with the reader in mind.The author even took the time to write meaningful and super useful Appendices, something one doesn’t see that often.Trust me, this is THE book to start your Git Learning Journey.
Pamela Bauer –
To the point. Easy read. Good examples.
CHARLES L L DUARTE –
O livro faz um passo a passo do uso do Git de tal forma firmar conceitos importantes desta ótima ferramenta.
Icicle –
Contrary to what some people believe, knowing something and being able to teach it to someone else are very different skills. In this book the author is clearly a brilliant teacher of the subject. Having spent some frustrating years muddling through with half a dozen git commands and reading cheat sheets or hastily written Medium tutorials I decided to try to understand it properly. The author does several things that makes this process really easy.- The visuals are superb at illustrating what is going on. Git is something that can be quite hard to visualise when you are learning it, especially when you start using remote repos and doing merges.- The author does not assume too much knowledge and goes at a consistent pace throughout, following the same process in each chapter and layering knowledge on top of what was learnt in the previous chapter. Many’s the review I’ve read of other books that say that the first few chapters were ok, and then there was a big jump that left them lost. That’s not the case here.- The author starts off with just a local repo to embed the key concepts before introducing the remote repo.- The example used is simple enough that you aren’t distracted by it and doesn’t require you to download stuff that might not work or is out-of-date.Another reviewer commented that the pace was a bit slow, but I would suggest that this subject lends itself to methodically working through the example. It doesn’t take very long. I probably completed the book in 6-8 hours over a couple of days. This is one of the few technical books I have bought that I have read cover-to-cover and where I followed the example through all the way, and it was worth it. Whether you are a complete beginner with Git or someone who has been muddling through, praying you don’t hit merge conflicts, this is the book for you. I’d give it six stars if I could.