Learn Git The Hard Way
This git course has been written to help users to get to a deeper understanding and proficiency in git. It doesn’t aim to make you an expert immediately, but you will be more confident about using git and building your knowledge up from here.
Introduction
Why Learn Git The ‘Hard Way’?
The ‘Hard Way’ is a method that emphasises the process required to learn anything. You don’t learn to ride a bike by reading about it, and you don’t learn to cook by reading recipes. Books can help (this one hopefully does) but it’s up to you to do the work.
This book shows you the path in small digestible pieces based on my decades of experience and tells you to actually type out the code. This is as important as riding a bike is to learning to ride a bike. Without the brain and the body working together, the knowledge does not get there.
If you follow this course, you will get an understanding of git that can form the basis of mastery as you use it going forward.
What You Will Get
This course aims to give students:
- A hands-on, quick and practical understanding of git
- Enough information to understand what is going on as they go deeper into git
- A familiarity with advanced git usage
It does not:
- Give you a mastery of all git’s internals
- Give a complete theoretical understanding of all the subtleties and underpinning technologies of git
- Explain everything. There is plenty of time to go deeper and get all the nuances later if you need to
You are going to have to think sometimes to understand what is happening. This is the Hard Way, and it’s the only way to really learn. This course will save you time as you scratch your head later wondering what something means, or why that StackOverflow answer worked. You will also be able to construct your own solution and explain why that StackOverflow answer might not be perfect…
Sometimes the course will go into other areas closely associated with git, but not directly git-related, eg specific tools, terminal knowledge. Again, this is always oriented around my decades of experience using git and other source control tools, and I explain what’s needed as I go.
Assumptions
This book assumes some familiarity with very basic shell usage and commands. For those looking to get to that point, I recommend following this set of mini-tutorials:
It also assumes you are equipped with a bash shell and a terminal. If you’re unsure whether you’re in bash, type:
echo $BASH_VERSION
into your terminal. If you get a bash version string output like this then you are in bash:
3.2.57(1)-release
If you are not in bash, then that’s not necessarily a problem, but be aware of it as a possible issue if you stumble (and let me know!).
I also assume you have a relatively up-to-date version of git. The git version on my Mac as I write this is:
git version 2.14.3 (Apple Git-98)
You can compare this to yours by typing this on the command line:
git version
Again, if you are not in the same version, then that’s not necessarily a problem, but be aware of it as a possible issue if you stumble (and let me know!).
How The Course Works
The course demands that you type out all the exercises to follow it.
Frequently, the output will not be shown in the text, or even described.
Any explanatory text will assume you typed it out. Again, this is the Hard Way, and we use it because it works.
This is really important: you must get used to working in git, and figuring out what’s going on by scratching your head and trying to work it out before I explain it to you. Eventually you will be on our own out there and will need to think for yourself.
Each section is self-contained, and must be followed in full to be sure that it makes sense. To help show you where you are, the shell command lines are numbered 1-n and the number is followed by a $
sign, eg:
1 $ first command2 $ second command
At the end of each section is a set of ‘cleanup’ commands (where needed) if you want to use them.
Structure
This book is structured into four parts:
Part I - Core, Local Git
Core foundational concepts essential for managing git repositories locally.
Part II - Advanced Local Git
More advanced local repository management.
Part III - Remote Repository Management
Distributed management of git repositories.
Part IV - Advanced Git
This chapter delves a bit deeper into git for the user that wants to go further.
If you have any questions about the book before buying, please contact the author at: