
Tech • IA • Crypto
Git and GitHub have become essential developer tools in 2026, enabling reliable version control, collaboration, and structured software workflows.
Git is now a baseline expectation for developers across hiring, teamwork, and open-source contribution. Employers increasingly prioritize the ability to manage and collaborate on code, not just write it. Version control reduces risk, improves accountability, and supports scalable development practices.
Git tracks every change in a project, allowing developers to revert to previous states instantly. Each saved state, known as a commit, captures what changed and when. This system enables experimentation without fear of permanently breaking working code.
While Git operates locally, GitHub hosts repositories online, providing backup, accessibility, and collaboration features. Developers can sync projects across devices and share code publicly or privately. The platform supports unlimited repositories under its free tier, with paid plans starting at $4 per user per month for advanced features.
A repository stores project files and their full history. Commits act as checkpoints, documenting incremental changes. Branches allow developers to work on features or fixes independently, while merges combine completed work back into the main codebase.
Tools like GitHub Desktop reduce reliance on command-line operations by offering a graphical interface. This lowers the barrier for beginners, allowing them to manage commits, branches, and synchronization through point-and-click workflows.
The standard development cycle involves editing files, committing changes locally, and pushing updates to GitHub. Git tracks even minor edits and highlights differences between versions, improving transparency and control over code evolution.
Git enables safe recovery from mistakes through features like revert and discard. Developers can undo commits, restore deleted files, or roll back uncommitted changes without manual fixes. This reduces downtime and prevents data loss.
Branches isolate workstreams, allowing developers to test features without affecting stable code. Switching between branches updates project files automatically, ensuring clear separation of versions. This approach supports parallel development and minimizes conflicts.
When multiple changes affect the same code, Git flags a merge conflict requiring manual resolution. Developers choose or combine conflicting changes, reinforcing code review and intentional decision-making rather than automated overwrites.
Teams use pull requests to propose and review changes before merging into main branches. This process enables discussion, feedback, and quality control. Code reviews help prevent bugs and maintain consistency across projects.
GitHub includes tools such as Issues, Projects, and Discussions. Issues track bugs and tasks, Projects provide Kanban-style workflows, and Discussions enable broader communication. These features centralize planning and execution within the codebase.
Developers are encouraged to make small, meaningful commits with clear messages. Sensitive data should never be committed, and work should occur in feature branches rather than the main branch. Pulling updates before pushing changes helps avoid conflicts.
GitHub supports GitHub Pages for hosting websites, GitHub Actions for workflow automation, and versioning through releases and tags. These tools extend GitHub beyond version control into deployment and continuous integration.
Git and GitHub have evolved into foundational infrastructure for modern software development, combining version control, collaboration, and project management into a unified workflow.
Have you ever broken your code like so badly that you just kind of gave up and then started over from scratch? Maybe you deleted something important or maybe you tried adding a new feature and then everything just kind of stopped working. Or maybe you ended up with files named final project version two actually final because you were afraid to override anything. So that frustration is exactly why Git exists. Then in 2026, knowing Git isn't just a bonus skill, it's a baseline expectation. So whether you're applying for jobs, collaborating on a team, contributing to open source, or building your own projects, version control is part of the standard developer toolkit. Companies don't just look for people who can code. They look for people who can manage and collaborate on code professionally. So, in this video, I'm going to teach you how to use Git and GitHub from the ground up, so that by the end, you're going to understand how to track changes, recover from mistakes, work with branches safely, collaborate with others, and publish your projects online with confidence. Before we dive in, if you do want to master Git and GitHub in just 2 hours instead of spending weeks figuring it all out all on your own, I've got a complete Git and GitHub Pro program and a community with everything that you're going to need. links in the description down below. But first, let's go ahead and get you started with the basics. Almost every developer has experienced that moment of panic after deleting code or breaking something that was just working perfectly 5 minutes ago. So, like what I said earlier, there is a better way to manage those changes and that's where Git comes in. So, what actually is Git? At its core, Git is a version control system. But that sounds more complicated than it really is. The easiest way to think about it is this. So, git is a sort of time machine for your project. Every change that you make gets tracked. Every version gets remembered and at any point should you want to, you can rewind to a previous state like nothing ever broke. It lets you experiment without fear and fix mistakes without panic and build features without constantly worrying about messing things up. And that's what makes Git so powerful. It gives you control over your project's history. So now let's talk about GitHub. GitHub builds on top of Git. And while Git works locally on your computer, GitHub takes your repositories and then stores them up in the cloud. And that means your code is backed up, accessible from anywhere, and easy to share with others. If Git is the engine running your version control, GitHub is the platform that puts it online, making collaboration, syncing across devices, and of course teamwork feel seamless. So before moving forward, let's just simplify a few key terms you're going to hear constantly. A repository or repo is simply your project folder. It holds all of your files along with the entire history of changes git tracks behind the scenes. And as you work inside that repo or repository, you'll regularly create a commit. Now a commit is basically a sort of safe point. It captures the state of your project at a specific moment and then records exactly what changed. But instead of doing all your work directly in the main version of your project, Git gives you something called a branch. And a branch lets you create a separate space to experiment, to build features, or test ideas without risking your stable code. And when you are happy with those changes, you use a merge to bring everything back together. And merging simply combines the work from one branch into another. Simple as that. Usually into the main branch once it's ready. So these concepts are really important to keep in mind because everything else does build on these simple foundations. All right, so getting started with Git can feel a little bit of intimidating at first, especially if you've heard people talk about terminals and complex commands, etc. And the good news is setting everything up is actually quite simple. And once it is installed, you won't have to think about it ever again. So, let's start by going to git-secm.com, the official Git website. And from here, download Git to your operating system, whether that's Windows, Mac, or Linux. And if you are on Windows or a Mac machine, use the direct installer and click through the setup like you would with any other normal installation or application. Linux users can install Git through the terminal using their package manager, but the process is just as straightforward. And once the installation finishes, Git is officially now on your system. Congrats. So next, head on over to desktop.github.com and download GitHub Desktop. Now, while Git can be used entirely through the command line, GitHub Desktop makes things a lot easier, especially if you are new. It provides a visual interface for Git operations. So instead of memorizing commands, you can just manage commits and branches and syncing with simple pointandclick actions. It allows you to understand the workflow without being too overwhelmed by all the terminal syntax. Install GitHub Desktop, then open it up. Creating a GitHub account. If you don't have one yet, a GitHub account, just go to github.com and sign up. And the process is still just as quick. Enter your email, choose a username, create a password, and verify your account. GitHub's free plan includes unlimited public and private repositories with all the core features that most people already need. And if you're working with a whole team and you require advanced collaboration tools, paid plans start at just $4 per user per month. For learning and personal projects, the free plan is just more than enough. So, after creating your account, all you got to do is sign in through GitHub desktop. It's going to connect directly to your GitHub profile. And during setup, make sure your name and email are configured correctly and this information gets attached to your commit. So every change that you make is properly identified. And once that's done, your environment is ready to go. Git is installed, GitHub Desktop is connected, and your account is all set up. And so now it's time to create your first repository and then just start putting everything that we've been talking about into practice. So inside GitHub desktop, click create a new repository here. Choose a name for your project and select the directory where you want it stored. So that folder becomes your local repository. The place where git tracks every change that you make. And as soon as the repository is created, git automatically generates a hidden folder called.git inside your project directory. You won't usually interact with it directly, but it is the core of your repository here. It stores all the metadata, commit history, and internal objects that Git needs for version control. And without the.git folder, Git wouldn't be tracking well anything. So, make sure you keep it there. During setup, you're going to see options to initialize the repository with a readme.md file and a.git ignore file. The readme.md acts as the introduction to your project. It explains what the project does, how to use it, and any important setup instructions. On GitHub, this file appears on the repository homepage, making it the first thing that most people see. The Git ignore file tells Git which files should be intentionally ignored. So, this prevents unnecessary or sensitive files like environment variables, dependencies, or system files from being tracked. GitHub Desktop also provides template options based on different languages and frameworks. So, just choose one that matches your project. With the repository created, add your project files. Then open your project directory and paste your existing files into it. You could also build something from scratch in your own IDE, but in this demo here, we're just going to be adding an existing template project that we'll use throughout this tutorial. So, as soon as your files are added or modified, GitHub Desktop detects them automatically. And at this point, it's important to understand the difference between the working directory and the staging area. The working directory is where you actively edit your files, your live project folder. The staging area is a temporary holding space where you prepare specific changes for the next commit. It allows you to control exactly what goes into your snapshot. So before committing, write a clear and descriptive commit message. And be specific here about what changed. Instead of something vague like update, write something like add initial project template or initialize repository with readme and git ignore. So once your message is ready, just click commit. And there you go. You have now just created your first snapshot. And from here, git will officially track your project's history. So far, your repository exists only on your local machine. Git has been tracking your changes, but the project hasn't been shared or backed up online. Not yet. Publishing a repository is what connects your local work to GitHub's cloud platform. So in GitHub desktop, click the publish repository button here. But before completing the publish process, you will be asked to choose whether the repository should be public or private. A public repository is visible to anyone on the internet and anyone can view your code, explore your files, and clone the project. And this is ideal for portfolios, open source work, or anything that you're comfortable sharing publicly. Of course, a private repository is restricted to you and the collaborators that you explicitly invite. This is typically used for personal projects, some client work, or anything that should not be publicly accessible. So after selecting the visibility settings, confirm the publish action. Then GitHub desktop will automatically push your commits to GitHub upstairs in the cloud and create the online version of your repository. So the entire process happens with just a single click without needing to use the command line. And that's great. It's simple. So once the upload is complete, go to github.com and then open up your profile. And now you'll see your newly published repository listed right there. and then clicking on it will open up the web interface where your code commit history and project structure are displayed directly in your browser. So your project is now stored online and accessible from pretty much anywhere. When you open up your repository on GitHub, you'll land on the repository homepage. So here at the top you'll see the repository name, its visibility status, and key statistics such as stars, forks, and branch information. Below that, your readme file is displayed followed by the complete file structure of your project. Now, the file browser allows you to navigate through folders and open files directly within the browser. You can view the contents of each file and also see when it was last modified along with the commit associated with that change. Now, if you click into the commit history, you'll see a chronological list of all changes made to the repository. Each commit shows who made the change, when it was made, and the message describing what was updated. So this provides full transparency into the evolution of the project. The settings tab gives you control over the repositories configuration and from there you can rename the repository, adjust the visibility, manage collaborators, configure branch protection rules, and also set up integrations. So at this stage, your workflow now extends beyond your local machine. Your repository is backed up online. It's visible through a web interface and now it's ready for collaboration whenever you need it. The thing is creating a repository is just the setup. So the real power of Git shows up in your everyday workflow when you're editing files and making improvements and occasionally fixing mistakes. So let's start by opening your project in your IDE or text editor such as VS Code. Here we'll add a simple comment inside the index.html file. It's a small change, but that is the point here. Git tracks everything, even minor edits. And after saving the file, switch back to GitHub Desktop. And here you'll immediately see that the file is marked as changed. GitHub Desktop highlights exactly what was modified, showing you the differences line by line. And this makes it very clear what is about to be included in your next commit. And to commit the change, add a commit message describing what you did. For small edits involving a single file, GitHub Desktop just automatically stages the change for you. But if multiple files are involved, you can manually choose which ones to include. And once the commit message is written, all you got to do is click commit. And after that, the change will be saved locally in your repository's history. To sync it with GitHub, just click publish to origin here. And then this will send your commit to the current branch and in this case the main branch updating the online version of your project. And that's the core workflow. Edit, commit, and push. So one of Git's most powerful features is the ability to move backward when something does inevitably go wrong. And if you want to view previous changes, just open the history tab in GitHub desktop. This will show you a chronological list of all of your commits. If you want to undo a commit, simply right-click it and select revert changes, git will create a new commit that then reverses the selected one. You can see here on your screen that after reverting the commit that added the comment, the comet disappeared from the file, thus restoring the project to its previous state. So the same principle applies to deleted files as well. So let's try to delete a file from the project. Then let's go into the history and revert that deletion commit. And after that, as you can see, the file was restored exactly as it was before. You can also discard changes that haven't been committed yet. So let's say you edit a file, but then you decide, I don't want those changes. So you just rightclick the file in GitHub desktop and then choose discard changes. And then the file will immediately return to its last committed version. So now to make this more realistic, let's try to intentionally break the code and then recover from it using GitHub Desktop's revert feature. All right, so did you see that there was no need to manually try to fix mistakes because Git just handled the recovery cleanly and safely. And this is what makes Git so powerful. It allows us to experiment to make mistakes and even break things knowing that we can always return to a stable version of our project. So branches are what take Git from basic version control to a powerful development tool because now you don't have to work directly on your main codebase and then risk breaking something important. Branches give you a safe space to build, test, and experiment. They allow you to try new ideas in isolation without affecting your working project. You can develop features separately. you can keep your main branch stable and even collaborate with others without constantly stepping on each other's changes. In short, basically branches let you move fast without creating chaos. To create a branch in GitHub Desktop, just open up the branch panel here and click new branch. Let's give it a name, something descriptive like a test or feature update. And once the branch is created, publish it so it exists on GitHub as well. This initializes the branch online and allows you to push changes to it just like your main branch. With the new branch active, you can begin making changes. In the demonstration here, a comment was removed from one of the project files. After saving the file, GitHub Desktop detected the modification. The change was committed and then pushed to the new branch. Switching between branches is also quite simple. Just make sure to open up the branch panel and then select the branch that you want to activate. And when you switch branches, your project files will update automatically to match that branch's version. So here you can see that switching back to the main branch restores the original commented version of the file. And this clearly shows that the main branch and the test branch contain different versions of the project. And each branch maintains its own history and changes independently. So now once your feature or experiment is complete, it's time to merge. I'll create a new branch here called experiment of course. And then let's publish it. Inside that branch, several files are intentionally deleted. GitHub desktop showed those deletions very clearly here and the changes were committed. If we were say to switch back to the test branch, it will also show that those files are still present there, which confirms that branches are isolated from one another. And now to merge, just open the branch panel here and select choose a branch to merge into. Then select the target branch. And in this case, merging the experiment branch into the test branch. After completing the merge, the deleted files from the experiment branch will be removed from the test branch. Then the merge is now successful. So now let's go ahead and switch back to the main branch and show that the original files are still intact there since no merge into main has occurred yet. If a branch is no longer needed, you can just delete it. So open up the branch panel again, rightclick the branch, and choose delete branch. Let's try to delete the experiment branch here. And there you go. As you can see, it immediately disappears from the list. Now, we're going to look at what happens when a merge conflict occurs and how to handle it step by step. First, we're going to switch to the test branch. Inside our test script, we'll go to line 18 and modify that line. So, for example, by changing the comment, then we'll save the file and commit the change. Next, we're going to switch over to our main branch. We'll open up the same file, go to that exact same line, and then edit it again, but this time with a different comment. After saving, we'll commit this change as well. So, at this point, both branches have modified the same line, but in different ways. So, now when we attempt to merge one branch into the other, Git won't be able to merge automatically. And as you can see, instead, it's going to pause the process and then show us a merge conflict. So, now we're going to open up the file. And as you can see that git clearly marks the conflicting section. It shows both versions of the code, one from each branch. And from here we're going to review the differences and then decide what makes the most sense. And we can keep one version of course, keep the other or combine them into a clean final version. After removing the conflict markers and then finalizing the code, we'll save the file and commit the resolve version. Once we return to GitHub desktop, we'll see now that the merge conflict warning, it's all gone. And that's it. Merge conflicts are not errors. They're just simply moments where Git needs us to make a decision. And once you understand the whole process, handling them becomes a normal and manageable part of working with branches. Git becomes even more powerful when you're not working alone. Because GitHub isn't just a place to store code. It's designed to make collaboration structured, transparent, and of course, organized. So, let's say you're building a project with other people. The first step is adding collaborators. And to do this, all you got to do is open up your repository on GitHub. Go to the settings tab here and navigate to the collaborators section. And from there, you can invite people by their GitHub username or email. And once they accept the invitation, they'll be able to contribute based on the permissions you assign. And even though no actual collaborators were invited here in this demonstration, the process itself is straightforward and shows how easily teamwork can be set up. Another important concept is cloning repositories. Now cloning means creating a copy of an existing repository on your local machine. And this allows you to download someone else's project and work on it locally. In the demonstration, a public project from Microsoft was cloned using the terminal. And once cloned, the project now exists on my computer just like any other local repository and I can explore or modify it as needed. So cloning is how most collaborative work just begins. You pull a shared repository down to your system and then you start contributing. When working in teams, changes usually aren't merged directly into the main branch. Instead, what happens is they go through a pull request, often called a PR. A pull request is essentially a proposal. It asks to merge changes from one branch into another, typically into the main branch. So, before the merge actually happens, team members can review the changes. They can leave comments. They can suggest improvements or request modifications. Here, I'm going to show you the pulled request, the PR, and the process of creating a new PR. Even though it was short, it highlights an important part of professional workflows. The code review process just happens inside the pool request. The PR team members examine the proposed changes, discuss them if needed, and either approve or request further adjustments. Only after approval does the branch get merged. So, this review system will help you maintain quality and prevent unstable code from being added to the main branch. Collaboration does not stop at pushing code or merging pull requests. GitHub also provides built-in tools that help teams communicate and organize their work and manage progress a lot more effectively. Now, one of the most important features of GitHub is GitHub issues. Issues allow you to track bugs, feature requests, or general tasks related to your project. Instead of discussing problems and random messages, everything just kind of stays organized in one place. You can assign labels, you can set milestones, and even assign issues to specific contributors. And in many ways really, it functions as a built-in task manager directly connected to your codebase. So to take organization a step further, GitHub projects provides visual boards similar to canban boards. You can move tasks through columns like todo, in progress, completed, giving your team a very clear overview of what's happening. Since projects integrates directly with issues and pull requests, it also connects planning and execution into one streamlined workflow. So for conversations that aren't directly tied to a specific bug or code change, GitHub discussions offers a more open space. It works like a forum inside of your repository where contributors and users can ask questions. They can share ideas or start broader conversations without opening an issue or a pull request. Now together, these tools transform GitHub from a simple code hosting platform into a complete collaboration ecosystem. And at this point, Git and GitHub aren't just about version control anymore. They become systems for planning, reviewing, and building software as a team. Understanding how Git works is important and using it well is what actually makes your projects cleaner, safer, and easier to maintain over time. Now, one of the most common questions that beginners have is when should I commit? A good rule of thumb here is to commit whenever you complete a logical unit of work. and that could be fixing a bug, adding a feature, or refactoring a section of code. Avoid committing only at the end of the day with dozens of unrelated changes bundled together. Rather, smaller, meaningful commits make your history easier to understand and much easier to roll back to if something does go wrong. Writing clear commit messages is just as important. Use present tense and be specific. For example, write add user authentication instead of something vague like changes or update. A good commit message should explain what was done in a way that someone else or even future you can immediately understand. It's also important to group related changes together. So if you fixed a bug and added a new feature, those should be two separate commits. Keeping commits focused makes reviewing history, debugging issues, and collaborating much smoother. A clean repository structure makes a big difference here, especially as projects grow. So, start with a logical folder structure. Organize your files into clearly named directories like src for source code, docs for documentation, and test for testing files. Following common conventions for your programming language or framework does help other developers quickly understand your layout. So use meaningful and consistent file names. Instead of naming files something generic like file 1.js or stuff.js, choose descriptive names like user authentication.js or payment service. py. So clear naming improves readability and reduces confusion. It's also best to keep each repository focused. One repository should represent one project or a closely related set of files. Mixing unrelated projects into a single repository just makes it harder to manage and collaborate effectively. So, there are a few mistakes that many beginners make and of course avoiding them early will save you a lot of trouble. First up, never commit sensitive information and this includes passwords, API keys, or of course personal data. Instead, use environment variables for sensitive values and make sure that configuration files likev are added to your.getit ignore so they are never trapped by git. Second, avoid working directly on the main branch. Create a feature branch for new work. So this protects your main branch from unstable or incomplete code and makes merging changes a lot more structured. Finally, always pull before you push, especially when working with others. Pulling ensures you have the latest version of the project before adding your changes, and skipping the step can lead to unnecessary conflicts and a whole lot of confusion. So following these best practices keeps your workflow clean, professional, and scalable. whether you're working alone or as part of a team. So right now you already understand the core workflow, creating repositories, committing changes, branching, merging, and collaborating. But GitHub offers far more than just version control. There are additional features worth exploring as you grow. And one powerful feature is GitHub pages. This allows you to host static websites directly from your repository for free. It's perfect for project documentation, personal portfolios, or simple web projects. And with just a few settings enabled, your repository can become a live website. Another major feature is GitHub actions and actions let you automate workflows within your repository. So, for example, you can automatically run tests every time code is pushed. You can deploy your project after a successful merge or trigger tasks when a pull request is created. So automation like this saves you a bunch of time and ensures consistency across your development process. Releases and tags are also useful when your project reaches important milestones. Tags allow you to mark specific commits as official versions like version one or version two. Releases build on that by letting you attach release notes and downloadable files. So this is especially useful for software that others install or depend on. For documentation beyond a readme file, GitHub wiki provides a built-in space for longer guides and structured documentation. It's a very convenient way to organize tutorials, setup instructions, or technical references directly within your repository. All right, so if you want to go deeper, learning Git through the command line is a strong next step. While GitHub Desktop is excellent for understanding the workflow, the command line gives you a lot more flexibility and access to advanced features. But once you are comfortable with it, it can also make your workflow a lot faster. You can explore advanced branching strategies like git flow or trunkbased development. So these strategies provide structured approaches for managing larger projects, especially when multiple developers and release cycles are involved. And finally, consider contributing to open-source projects. Open-source contribution exposes you to realworld collaboration, different coding styles, and of course, established workflows. It's one of the best ways to really sharpen your skills while giving back to the developer community. Git and GitHub start simple, but they do scale with you. And the more you explore, the more powerful they become. All right, that's it. I know for most of you, Git feels overwhelming. again at first, but once you do break it down like we did in this video, it really is just a structured way to manage change. And once you master it, it will be one of the most valuable tools in your development workflow. All right, so thanks for sticking around until the very end and investing your time with me today. I'll see you at the next