How to Learn Git From Scratch: Full Beginner Course

1.5M views
•
May 8, 2024
by
freeCodeCamp.org
YouTube video player
How to Learn Git From Scratch: Full Beginner Course

TL;DR

Git is version control software that lets you set checkpoints in a project, much like saving a game, so you can return to a moment when everything worked. This beginner course from Hitesh Choudhary teaches the workflow and behind-the-scenes internals rather than memorizing commands, covering init, commits, logs, merge, conflicts, diff, stashing, rebase, pushing to GitHub, and pull requests.

Transcript

in this G course for beginners Hest chowy will break down the essentials of Version Control to help you manage your projects more efficiently Hesh is a very popular instructor and in this tutorial he will teach you the tools and techniques you need to get started with get hey there everyone my name is hes and welcome to the YouTube channel I hope y... Read More

Key Insights

  • Version control exists because software has days when it works and days when it does not. Checkpoints let engineers go back in time to a state where things were fine and restart from there, the same way a game save works.
  • Git and GitHub are two very different things. Git is a software you install and learn, while GitHub is one of several service providers built around it, alongside Bitbucket and a plethora of other services on the market.
  • Installing Git does not mean you are using Git. The download page auto-detects your system, and installation is simply opening the file and clicking next, next, I agree. Learning how the software actually works is a separate effort.
  • The official Git documentation is better described as a reference manual than a learning resource. Pages for git or git config are so in-depth that the scroll bar shrinks to almost nothing, making them nearly impossible to learn from.
  • Git is a terminal-first tool according to the instructor. Graphical user interfaces exist, but understanding the commands and how they work makes you perform better on those GUIs too, and the command line only looks daunting at first.
  • The teaching method mixes handwritten pen and paper notes for theory with live terminal practice. Many tutorials go heavy on practical work alone, which is exactly where learners miss the behind-the-scenes detail of what sits inside the .git folder.
  • The series was recorded fresh because older Git tutorials look outdated. The technology is the same, but delivery, content creation, and video production need upgrading from time to time for engineers just entering the domain.
  • Typing the commands yourself produces a much better learning experience than watching. The instructor highly recommends following along on your own keyboard rather than passively consuming the practical segments.
  • The course covers conflict-heavy topics that beginners usually avoid, including git merge and merge conflicts starting at 1:07:47 and git rebase at 2:15:42, presented under the framing that rebase is not that scary.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is version control and why do software engineers need it?

Version control, also called a versioning system, is the practice of creating checkpoints in software so you can return to an earlier working state. The instructor compares it to saving a game: just as games have checkpoints, software can have them too. It matters because building software is not as easy as it looks, it requires patience and tools, many engineers collaborate on a single codebase, and there are days when software works and days when it does not. When something breaks, version control lets the team go back to the point where things were working absolutely fine and start again from there.

Q: What is the difference between Git and GitHub?

Git and GitHub are two very different things. Git is a software, specifically a source control management tool, that you download and install on your machine and that this course teaches you to master. GitHub is a service provider built around Git, one of several available in the market. The instructor names Bitbucket as another popular option and notes there are plenty of others. He stresses that learners should understand this distinction before starting, since the series focuses on mastering Git itself while also covering GitHub services such as pushing code and opening pull requests in later chapters.

Q: What software do you need to follow this Git course?

You need very little: a terminal and a code editor. The instructor uses Warp as his default terminal, which he describes as a redesigned command line available for Mac and Linux, with the team already working on a Windows version. He says you can use any terminal you prefer. For the editor he uses Visual Studio Code. Notably, no code is written during the course at all. The series is language independent because the goal is mastering Git, not a programming language, so only plain text data is created to observe what happens behind the scenes.

Q: How do you install Git on your computer?

Go to the Git website, described in the course as the homepage for the source control management software. The download section automatically detects your operating system and offers the right build, and you can also click through to pick the Mac, Linux, or Windows version yourself. Installation is straightforward: open the downloaded file and proceed through next, next, I agree. The instructor adds an important caveat, that installing the software does not mean you are using it. Installation is only the setup step, and learning how Git works is the separate work the course covers.

Q: Why is the official Git documentation hard to learn from?

The instructor calls the official documentation a jungle. Clicking through to the reference manual initially looks like a small set of pages, but opening entries such as git or git config reveals extremely long content, visible from how tiny the scroll bar on the right becomes. He says it is unreadable in the sense of being far too in-depth for a beginner and almost impossible to go through. His conclusion is that it is not really documentation but a reference manual: whatever you need is there, but it is not easy to find, so it works better for exploring specifics later than for learning.

Q: Should you learn Git through the command line or a GUI?

The instructor believes Git is a terminal-first tool and still holds that view one hundred percent. He acknowledges that many graphical user interfaces exist for Git, but argues you truly thrive in the industry through the command line. He also makes a practical point in favor of the terminal even for GUI users: the more you understand about the commands and how they work, the better you will perform on those GUIs as well. He reassures beginners that although the command line might look daunting at first, it is absolutely easy to work with.

Q: What topics does this Git course cover and how long is each section?

The course runs in nine chapters. It opens with an introduction to the Git series at 0:00:00, then covers git init and the hidden folder at 5:54, commits and logs at 23:27, and Git internal working and configs at 40:02. The second half covers git merge and git conflicts at 1:07:47, git diff and stashing at 1:47:21, git rebase at 2:15:42 under the title rebase is not that scary, insight of pushing code to GitHub at 2:37:24, and finally how to make a pull request and contribute to open source at 3:18:18.

Q: Why does this course teach Git theory instead of only practical commands?

The instructor deliberately balances theory and practice because purely practical tutorials skip the behind-the-scenes detail. He notes that many learners say just show me the practical, but argues that once you understand what happens inside Git, what is in the .git folder, and how to study it, the learning journey is far better and the knowledge stays with you for life. He teaches the theory using handwritten pen and paper notes, which he considers a much better way to teach, while still following each concept with hands-on terminal work.

Q: How should beginners practice while watching this Git tutorial?

Follow along by typing the commands yourself. The instructor highly recommends this because you learn much more when you type commands with your own hands on the keyboard, calling it a much better learning experience than watching passively. He also sets up a dedicated folder to hold all the learning material, navigating to it with the cd command, and notes the contents are just text files rather than anything large enough to warrant sharing through a GitHub account. The overall aim is understanding the Git workflow rather than memorizing every available command.

Summary & Key Takeaways

  • The course is a full beginner series on Git developed by Hitesh Choudhary for freeCodeCamp. The stated goal is not memorizing thousands of Git commands but understanding how the Git workflow operates when software is designed, what happens when things go wrong, and what runs behind the scenes inside the Git folder.

  • Only two pieces of software are needed to follow along: a terminal and a code editor. The instructor uses Warp as his terminal, available for Mac and Linux with a Windows version in progress, and Visual Studio Code as the editor. No programming language is used, only text files, so the series is language independent.

  • The course runs about three and a half hours across nine chapters: introduction, git init and the hidden folder, commits and logs, internal working and configs, merge and conflicts, diff and stashing, rebase, pushing code to GitHub, and making pull requests for open source contribution.


Read in Other Languages (beta)

Share This Summary 📚

Explore More Summaries from freeCodeCamp.org 📚