OPERATING SYSTEMSOS Linux

Git Tutorial for Beginners: Learn Git in 1 Hour

Git: The essential tool for modern development. 🔧 This quick explainer shows why it’s a must-have skill.

🔥 Ready for a deep dive?
– Check out my full course: https://mosh.link/git-course
– Subscribe for awesome coding content: https://goo.gl/6PYaGF

📕 Get my FREE Git cheat sheet:
https://mosh.link/git-cheatsheet

✋ Stay connected:
– Twitter: https://twitter.com/moshhamedani
– Facebook: https://www.facebook.com/programmingwithmosh/
– Instagram: https://www.instagram.com/codewithmosh.official/
– LinkedIn: https://www.linkedin.com/school/codewithmosh/

💡 Why Git?
– Track code changes over time.
– Collaborate with other developers easily.
– Revert to older versions if something breaks.
– Essential for software & DevOps engineers.

📖 TABLE OF CONTENTS
0:00:00 Introduction
0:00:35 What is Git?
0:03:07 Using Git
0:06:11 Installing Git
0:07:38 Configuring Git
0:12:43 Getting Help
0:13:35 Cheat Sheet
0:14:05 Taking Snapshots
0:14:38 Initializing a Repository
0:17:10 Git Workflow
0:21:46 Staging Files
0:25:24 Committing Changes
0:27:37 Committing Best Practices
0:30:21 Skipping the Staging Area
0:31:46 Removing Files
0:33:48 Renaming or Moving Files
0:36:06 Ignoring Files
0:42:41 Short Status
0:45:33 Viewing the Staged and Unstaged Changes
0:50:33 Visual Diff Tools
0:55:27 Viewing the History
0:57:39 Viewing a Commit
1:01:37 Unstaging Files
1:04:28 Discarding Local Changes
1:06:17 Restoring a File to an Earlier Version

#git #devops #coding #softwaredevelopment

source

by Programming with Mosh

linux download

33 thoughts on “Git Tutorial for Beginners: Learn Git in 1 Hour

  • anyone here because of theo's video about git? :'D

  • Ug, this is NOT a tutorial for novices to Git as the title would lead you to believe, instead it is a rabbit hole of errata concerning the various methods, depending on your OS and your preference of GUI or no GUI, of interacting with Git. A complete novice would be overwhelmed and more confused after watching this, just ask me how I know this. Or look into the comments where at first it seems everyone is happy but a closer inspection reveals comments like this "Great video Mosh. I've been using git for years, and I've learned a couple of new things from this video". Exactly, if you are NOT a novice, NOT a beginner with Git, then this video is sure to provide a good deal of practical information about the environment around Git. If, however, your are an actual beginner trying to understand what stashes or commits are, or what branching is, and are looking for beginner information that won't have you losing the code you've spent many dozens of hours sweating over than all watching this video will do is bring you to the point of frustration where you just delete the code now and save yourself the trouble of ever worrying about it again. So, yeah, thanks Mosh! I'm stress (and code) free now and it's all because I watched your Git Tutorial For BEGINNERS!

  • I was desperately looking for a video explaining whats' Git, how it works, etc. because I hear from (G)it everyday from my colleagues without never really understanding this complex-looking tool. So 1000x thank you Mosh ! This is at last the video and explanations I was looking for in order to beginn 🙂

  • it feels that beginners would benefit from taking some prerequisite courses before taking this one because as a beginner I still felt lost sometimes watching this, mostly due to unfamiliarity with the programmaing language syntax. But I can see how well-structured this course is. So my suggestion is, for each of those courses, list out the course videos that audience should watch before hand.

  • It's good to mention that .gitignore has to be UTF-8 encoded. When I created the file in VSCode it was encoded in UTF-16 by default, which caused extra empty spaces to appear and thus .gitignore had no effect

  • I have made some mistakes while solving the conflicts and then created a pull request through the visual studio from my local branch to development branch.

    Can u explain to me about how to undo that pull request so that I can start freshly check and solve the conflicts again

  • I've had to adapt to Git at work for a while now. I still miss the previous centralized software. Life was so much easier.

  • when i running the configuration i got a issue like there was a problem with the editor 'code-wait'.

  • I have one more question:
    1. Why in Git adding and removing file is same command? It is a big confusion!!!
    2. What is the reason provide option to commit directly avoid (skip) publish in the Staging area first? So I think this is back door

  • In "Renaming or moving files" we can see renaming "file1.txt" with "main.js" using separated command. Immediately after that renaming "main.js" with "file1.js" was done using single command. But in status we see "file1.txt" -> "file1.js". WHAT?!?!?!?

  • Git is the social glue that helps people work together! When I started learning git, I was trying to find a natural analogy… but I could not find one that does not involve the complexity of intelligent people organizing together to make something bigger than what they can produce alone. If you like music, it's like composing and performing a symphony! I find Git easier to understand in the context of individual vs group behaviour such as unit-testing, integration-testing, system-testing, and releasing production quality code. Thank you for this social glue!

  • I wish you show the actual installation and what settings to click on and not to click on for installation. As someone who is a beginner and doesn't know anything it is better to just hand hold and assume the watcher doesn't know anything. If I have to go to other places outside the video then I consider that a fail and defeat the purpose of a learning video. Normalize stop skipping the installation process and what settings to use. Please show your screen of actually doing the configuration steps before going on a diatribe. You just start with "here in the terminal window…" Without actually showing what you clicked on to open terminal in different versions. I use Windows so do I use Git Bash, Git CMD or Git GUI?

  • Hi Mosh – Very clear explanation and will consider buying the full course. I have a very basic question. What is the purpose of staging area? You could review in the project before committing to local repo? Another question – local repo is represented by the .git folder. This is a tangible thing representing local repo. Where is staging area located? Or how physical entity represents the staging area? If staging area is located in local machine, how can other team members review the changes?

  • ""git commit" is not opening VS code even though "code" opens it just fine. If anyone knows why I'd appreciate the help 🙂

  • Hello Mosh , pls help me to move the next step , I already done the basics of HTML , CSS , JS , and my goal is front end development , so is git course the correct move now for me or I have to learn React or vue before ?

  • I have to say this is the best git tutorial I have ever come across. I tried many ones, MAximilan schaezmuller, free code camp. But this one is a gold, explaining the theory well so that we understand exactly what is going on, and are not surprised by sudden git things

Comments are closed.