
No Comments Yet
Be the first to share your thoughts and start the conversation.
Be the first to share your thoughts and start the conversation.
How did you manage to remove the blur property and reach here?
Upgrading gives you access to quizzes so you can test your knowledge, track progress, and improve your skills.
By logging in, you'll unlock full access to this and other free tutorials on JSM Pro.
Why? Logging in lets us personalize your learning experience, track your progress, and keep you in the loop with new workshops, coding tips, and platform updates.
You'll also be the first to know about upcoming launches, events, and exclusive discounts.
No spam—just helpful content to level up your skills.
If that sounds fair, go ahead and log in to continue →
Enter your name and email to get instant access
In this Git crash course, participants will learn the importance of Git for modern developers, including how to navigate through code changes and manage projects efficiently. The course promises practical knowledge on resolving production issues, collaborating with teams, and mastering advanced Git techniques.
00:00:00 Imagine you're working on a coding project, and you make a mistake that breaks everything.
00:00:04 Your boss would most likely fire you if you were even able to get a job in the first place.
00:00:09 Without Git, you'd have no easy way to go back and undo the changes.
00:00:13 You're toasted.
00:00:14 Git is the industry standard.
00:00:16 Most companies, team, and open-source projects use Git, so naturally, every job description mentions it.
00:00:24 Learning Git isn't just a nice-to-have, it's your get-git-or-get-out moment.
00:00:29 It's a must for any serious developer wanting to land the job.
00:00:33 So, hi there, and welcome to a quick no-nonsense Git and GitHub crash course.
00:00:37 Unlike a typical Git tutorial, which only scratches the surface and leaves you pushing straight to production like many other interns,
00:00:45 We'll go beyond the basics and dive into the real stuff no one really talks about, like how to fix a broken production on a Friday.
00:00:53 By the end of this course, you'll not only know how to track code changes and collaborate with your team, but also professionally resolve merge conflicts,
00:01:02 fix real-life production issues, write clean commits so your team doesn't have to question your life choices, recover from major mistakes with reset,
00:01:11 revert, and checkout.
00:01:13 so when something breaks production, hand it will, you'll know exactly how to fix it and save the day.
00:01:19 Use Git through a GUI so you don't have to memorize tons of commands.
00:01:24 And even master advanced Git tricks like cherry picking and stashing, because you're here to GitGit and not just GitBuy.
00:01:31 Basically, with this crash course, you'll become your company's go-to Git guy, the person everyone turns to when things go south.
00:01:39 And there's a lot we'll cover in this video.
00:01:41 and I don't expect you to return to it anytime you need to refer to a command.
00:01:45 For that reason, I've put together the ultimate Git reference guide, packed with advanced tips and tricks, real-world use cases,
00:01:53 and commands to help you level up your Git skills.
00:01:56 You can download it for free by clicking the link in the description, and use it as a companion to this course and your career.
00:02:02 Let's dive right in.
00:02:04 So what is Git and why is it so popular?
00:02:07 Git is a distributed version control system.
00:02:10 Sounds fancy, right?
00:02:11 Well, let's break it down.
00:02:13 The version control part helps you track and manage code changes over time, while distributed means that every developer's computer has a complete copy
00:02:22 of the codebase, including its entire history of changes and information about who changed what and when, allowing you to Git blame someone.
00:02:31 Hopefully people won't blame you, but do you really need it?
00:02:35 Can you code without using it?
00:02:38 Well, of course you can, but then your workflow would look something like this.
00:02:43 You start coding your project in a folder named myproject, and as you make progress, you worry about losing your work.
00:02:50 So you create copies, myprojectv1, v2, v3, and so on.
00:02:56 Then your colleague asks you for the latest version.
00:02:59 You zip up MyProject V3 and email it over.
00:03:03 They made some changes and sent it back as MyProjectV3JohnsChanges.zip.
00:03:08 Meanwhile, you've continued to work, so now you have my project v4.
00:03:12 You then need to manually compare John's changes with your v4 and create a v5 incorporating everyone's work.
00:03:20 And then, a week later, you realize you accidentally removed a crucial feature in v2.
00:03:26 You dig through your old folders trying to figure out what changed between versions.
00:03:31 Now imagine doing this with 10 developers, each working on different features.
00:03:35 It's a recipe for chaos, lost work, and countless hours wasted on a version management system instead of actual coding.
00:03:44 Git solves all of these problems and more.
00:03:47 It tracks every change automatically, allows multiple people to work on the same project seamlessly, and lets you easily navigate through your project's history.
00:03:56 No more final version v2, final, really final zip files.
00:04:01 Git does all of this for you, but in a much more powerful and organized way.
00:04:06 To get started, you need Git installed.
00:04:08 Whether on Windows, Mac, or Linux, it's just two clicks away.
00:04:12 Google, download Git and get it for your operating system.
00:04:16 Once Git is installed, open up your terminal.
00:04:18 First things first, let's check whether you've installed Git properly.
00:04:22 Run git – version.
00:04:25 and you'll get back the version that is installed on your device.
00:04:29 Next, you need to configure Git to work with your name and email.
00:04:32 This is just to track who made the changes in the project, so your colleagues know who to blame.
00:04:37 Here's the command.
00:04:38 git config –global user.name And then in single quotes, put in your name.
00:04:44 Once you do that, you can repeat the same command, but this time, instead of changing user.name, we'll change user.email and here you can enter your email.
00:04:54 Press enter and that's it.
00:04:55 You're all set up.
00:04:56 Now let's talk about repositories.
00:04:58 A repo or a repository is where Git tracks everything in your project.
00:05:03 Think of it like a folder that stores all the versions of your code.
00:05:07 Simply put, if a folder is being tracked by Git, we call it a repo.
00:05:11 Now let's create a new repository.
00:05:13 In your terminal, type git init and press enter.
00:05:17 As you can see, Git has just initialized a new repository.
00:05:21 On top of the success message, we can also see a warning.
00:05:23 In previous times, the default name of a branch has been master, but nowadays, you'll see main used much more frequently as the name for the primary branch.
00:05:32 So let's immediately fix it by configuring the initial branch name.
00:05:36 You can copy this command right here, and at the end, you can just say main.
00:05:41 Now, considering that we have just changed the initial configuration settings, we have to create a new folder.
00:05:46 Create a new one called something like Mastering Git, open it within your editor, and then rerun git init.
00:05:54 As you can see here and here, now we're in the main branch.
00:05:58 That means that Git has initialized an empty repository.
00:06:02 You won't see any changes yet in your folder, but a hidden .git folder has been created inside your directory.
00:06:09 You don't need to touch this folder.
00:06:10 Git handles everything inside, from commit history, branches you'll make, remote repos, and more.
00:06:16 Most of the time, Git will already come pre-initialized by the framework or library that you use to set up your project with.
00:06:24 That's how integrated Git is into every developer's life.
00:06:27 So now that we have this main right here, what does that exactly mean?
00:06:32 Well, main is the default branch name of your repo created by Git.
00:06:36 Every time you initialize Git, this branch will be automatically created for you.
00:06:40 I'll teach you more about Git branches soon, but for now, know that a branch is nothing but a parallel version of your project.