Git and GitHub Crash Course For Beginners | Complete Tutorial [2024]

  Рет қаралды 27,480

Cameron McKenzie

Cameron McKenzie

Күн бұрын

Git isn't hard to learn, and when you combine Git and GitHub together, you've just made your life a whole lot easier.
I put this Git and GitHub tutorial together to provide a full journey through what every developer needs to know about Git and GitHub, from basic commit history operations, to advanced Git rebase and squash commands. It's great for advanced users, but Git and GitHub beginners will love it as well.
Most Git commands are demonstrated both on the command line and in the online GitHub tool. Furthermore, various GitHub features like pull requests and forking are demonstrated as well demonstrating many of the core differences between Git and GitHub.
If you need a crash course in Git and GitHub, and you want to learn about GitHub and Git in a fun and friendly environment, this Git and GitHub tutorial is for you!
0:00 Git and GitHub Course Overview
3:05 Difference between Git and GitHub
9:34 What is a Git repository
11:04 Create a Git GitHub repo
13:00 Create files on GitHub
14:12 GitHub commit history
15:19 GitHub URL
17:46 Clone a GitHub repo
19:25 Git status command
19:29 Git add command
21:25 Git config name and email
23:12 Git commit on command line
23:45 Git log a dog
26:15 Git push origin
29:00 Git pull
32:30 Git fetch
34:54 Git commit all
35:42 Git reflog
36:33 Git cheat sheet
37:30 Git & GitHub commit history
44:00 Git reset hard
45:49 Commit, add, revert, reset
49:50 Git reset a commit
53:35 Revert a commit
55:15 Git cherry-pick
57:01 Push project to GitHub
57:41 Git remote add
58:08 Git push upstream
1:00:11 Git branching
1:07:37 Git init
1:08:20 Create a Git branch
1:09:30 Switch branches
1:12:01 Git merge branches
1:12:20 Git merge vs rebase
1:14:00 GitHub merge into Master
1:18:15 GitHub pull requests
1:19:44 Merge GitHub pull requests
1:26:10 Git rebase command
1:30:45 Use Git and GitHub together
1:41:12 Git merge conflicts
1:45:25 Resolve GitHub merge conflicts
1:46:45 Squash Git commits
1:48:43 Git stash
1:50:23 Git stash pop & apply
1:50:57 Git and GitHub Review
1:52:45 Scrum Master Certification Guide
1:53:00 Learn Git and GitHub resources

Пікірлер: 115
@shofada
@shofada 3 ай бұрын
This is how teaching particularly teaching tech-related content should be done.
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks for the kind words! I really saw this Git and GitHub tutorial as a journey through the various commands, starting from the basics and working to the advance. I'm glad you enjoyed it!
@rolandrooseveltagodzo5974
@rolandrooseveltagodzo5974 4 ай бұрын
Your style of teaching is so unique...so inviting, not intimidating at all, so easy to follow and understand. Thank you!!
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks for the kind words. Git and GitHub are indeed intimidating topics. I'm so glad I made these important DevOps tools more approachable for you. Thanks for watching!
@HappyHealthyWealthyYou
@HappyHealthyWealthyYou 4 ай бұрын
totally! great teacher!!
@cameronmcnz
@cameronmcnz 4 ай бұрын
@@HappyHealthyWealthyYou Thanks for the encouragement! Honestly, it's Git and GitHub that makes it fun. I'm just a conduit to the Git and GitHub goodness!
@jildigere
@jildigere 2 ай бұрын
Cameron is my type of guy. After long search of the right tutor for me, i found cameron. Thanks Man.
@cameronmcnz
@cameronmcnz 2 ай бұрын
You'll change your tune when you get my tutoring bill. 💰💰💰 I really enjoyed putting this git and github tutorial together, and it's exhilarating seeing it get more than the typical 200 views my videos normally get. Thanks again for watching and for the kind words!
@chethanmg7
@chethanmg7 Ай бұрын
@@cameronmcnz haha.
@user-qr4kt7dh4m
@user-qr4kt7dh4m 2 күн бұрын
Amazing Git and GitHub tutorial for beginners like me!
@mapleafstoronto3862
@mapleafstoronto3862 2 ай бұрын
This is the best tutorial of Git & GitHub for beginger. After I watched this, I can understand what others saying. Thanks
@cameronmcnz
@cameronmcnz 2 ай бұрын
Exactly what I'd expect a fellow Torontonian to say! Quite frankly though, this is not great for a true 'beginner.' There are lots of other really simple, 'beginner tutorials' that outrank me on Google. My videos tend to move quickly and I assume a much higher level of technical competency that other, similar tutorials. If you found this tutorial helpful, it's an indication of the fact that you're probably more advanced and more knowledgeable than the typical person searching for a Git and GitHub tutorial. Thanks for viewing, and I am glad I helped! If you did understand what I covered here, I grant you expert status. This tutorial covers just about every Git porcelain command there is. Go Leafs Go!
@turteschris3191
@turteschris3191 2 ай бұрын
I wish this video had more views and recognition. Cameron really gets into how it makes sense when connecting with github AND how development works!
@cameronmcnz
@cameronmcnz 2 ай бұрын
Thanks so much for the kind words! I really enjoyed putting this together, and I really wanted this to feel like a continuous journey, not just a bunch of mini-tutorials. I too would love to see more hits, but my channel has never managed to win the KZbin algo war. Here's hoping one day it will!
@haohsuanfu3019
@haohsuanfu3019 Ай бұрын
The style of teaching is very clear, helpful, and inviting! Thank you very much. 謝謝。
@cameronmcnz
@cameronmcnz Ай бұрын
Thank you for the friendly words! I really enjoyed putting this video together!
@DrNichelleDionne
@DrNichelleDionne 2 ай бұрын
Thank you for this because I want to incorporate GitHub into my Python and C++ courses.
@cameronmcnz
@cameronmcnz 2 ай бұрын
You are taking both Python and C++? That's like learning how to drive a go-cart and a Formula 1 car all at the same time. Stay safe from all those pointers in C!
@Tekttskskwdi
@Tekttskskwdi Ай бұрын
One of the best and straightforward and helpful git tutorial ever for beginners, I can say I watched at least 3-4 videos but could not grasp the idea behind the concepts. This video cleared it all and I mean wish you best for your rest of life.
@Tekttskskwdi
@Tekttskskwdi Ай бұрын
Also can you make similar introduction tutorial for docker with dockerization on web app project.
@cameronmcnz
@cameronmcnz Ай бұрын
Thanks for the kind words! To be quite honest, I felt bad calling this a 'beginners' tutorial because I think it moves *very* quickly and covers very advanced topics. If you were able to keep up and still understand the content, that's more a reflection of you as an adept learner than anything else. Have fun working with Git and GitHub!
@cameronmcnz
@cameronmcnz Ай бұрын
@@Tekttskskwdi Actually, I have a very quick tutorial on dockerizing an app on NGinx that I think is one of my most popular, but it is more of a 'quick how-to' for people that know Docker than a tutorial. If you want a great, quick tutorial on Docker, this 8 minute video from @Scrumtuous is one of the best! kzbin.info/www/bejne/qH3VeoaJeL2cg9Esi=7KJwksN_QpiQ61ut
@daisymccarty7822
@daisymccarty7822 2 күн бұрын
Really make it easy to learn Git and GitHub!
@Nothing-hr2ef
@Nothing-hr2ef 24 күн бұрын
To be honest, this is one of the best tutorial for git and GitHub in youtube. Can you do the tutorial video for docker? it will be very helpful
@jennisonb37
@jennisonb37 3 ай бұрын
Cameron, it doesn't get much better than your teaching style. Thank you for taking the time to create this tutorial and post it. You have a new subscriber.
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks so much for the kind words! I've always been known for short, 2-minute videos that just solve a specific problem. This was my first foray into long-form content. I really enjoyed doing this, and it makes me feel great knowing it's resonated with a few people.
@Brandon-kx3zg
@Brandon-kx3zg 2 ай бұрын
As a visual learner, I liked your approach to teaching, nice!
@jasewarrior545
@jasewarrior545 13 күн бұрын
By far the best explanation of how to use Git. I have listened to so many tutorials and gotten so confused but now I can actually understand what is happening. Thanks Cameron, you are a great teacher.
@scrumtuous
@scrumtuous 5 ай бұрын
Wow, I'm not sure if there's anything in that Git and GitHub tutorial that wasn't covered! Learned a lot.👍
@cameronmcnz
@cameronmcnz 5 ай бұрын
Thanks for all your help with the videos and editing!
@hernanconderanne2152
@hernanconderanne2152 Ай бұрын
Fantastic!👏
@manojpriya6927
@manojpriya6927 5 ай бұрын
Amazing Cameron... Fantastic flow... Was struggling to put the pieces together.. This video has helped in bringing clarity. Thanks
@cameronmcnz
@cameronmcnz 5 ай бұрын
Thanks for the kind words! I've been teaching people about Git and GItHub for years and I've tried really hard to put things together in a journey that has a sensible flow, but at the same time, has sections that are very independent so you can jump in anywhere. Glad you enjoyed it and thanks for watching!!!
@stephanedemers2797
@stephanedemers2797 3 ай бұрын
Good learning again from this excellent training session!!!
@cameronmcnz
@cameronmcnz 3 ай бұрын
Honestly, Git and GitHub makes it super. Two completely amazing tools!
@TaofeekAgiri
@TaofeekAgiri 16 күн бұрын
The way you explain things excites me
@cameronmcnz
@cameronmcnz 16 күн бұрын
Always happy to encourage others who are digging into tough technical topics!
@MaksimVasilenko
@MaksimVasilenko 4 ай бұрын
Thanks Cameron! Very useful information about git.
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks! I really enjoyed putting this Git and GitHub tutorial together!
@roselinenkemasong723
@roselinenkemasong723 3 ай бұрын
Thank you so much. It was pretty easy for me to understand this lesson. I’m glad I stumbled on it
@cameronmcnz
@cameronmcnz 3 ай бұрын
I'm glad you stumbled on it too! Truth be told, I cover a lot of topics and get to advanced topics pretty quickly compared to other tutorials. If you kept you, then you're pretty much a Git expert now!
@frodobe_tbaggin3146
@frodobe_tbaggin3146 Ай бұрын
Great course, really enjoyed it!!!
@cameronmcnz
@cameronmcnz Ай бұрын
Git and GitHub are pretty awesome tools when combined. It make doing this video super-easy. Thanks for watching!
@AdelaGega
@AdelaGega 3 ай бұрын
I love your way of teaching, easy & interacting. Thank you, I learned a lot from you. Appreciate all your efforts!
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks so much for the kind words! Honestly, Git and GitHub make it easy, they're such awesome tools. I will say, I did have fun doing this Git and GitHub tutorial. Great to know you enjoyed it too!
@CamilleKleinman
@CamilleKleinman 4 ай бұрын
Your tutorials are super enjoyable (you're so funny lol) and SO helpful!!! You make learning all this stuff easy, fun, and not at all scary. :)
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks for the kind words! I honestly had a lot of fun making this Git and GitHub crash course. Plus, I'm a big Devo fan, so any time I can say Devo it makes me smile.
@jordachmakaya493
@jordachmakaya493 5 ай бұрын
I juste made PAUSE in 6.54 Min - i have seen lot of explantation about Git but that's so clear and the little screen that shows what each of the code does j-u-s-te "Briallant" !!!! Mr McKenzi you're an amazing guy - juste because its so easy for you to do that actually tell how skilled you are. Thank you, i'am excited to finish still 1H53min up to the end.
@cameronmcnz
@cameronmcnz 5 ай бұрын
Yet not a mention of my Super Mario speed run?
@-untilwearrive4701
@-untilwearrive4701 2 ай бұрын
Unlike other courses, yours was easy to follow. Thank you.
@cameronmcnz
@cameronmcnz 2 ай бұрын
That's very high praise, as there are lots of Git and GitHub courses and tutorials out there. I really enjoyed making this video, and I do hope my enthusiasm shows. Thanks for watching and subscribing!
@Sidee4
@Sidee4 4 ай бұрын
Your teaching is superb. The best tutorial on youtube. i love how you used both the terminal and Gui. it makes it more understandable. You are the best
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks so much for the kind words! And yes, when people see they can create a file and do a commit online with GitHub, it becomes less intimidating. Then when they clone and do some Git commands, it hopefully makes a bit more sense. I really enjoyed putting this tutorial together, so it's extra-rewarding to hear you enjoyed it!
@VolodymyrBoiko-dq8zp
@VolodymyrBoiko-dq8zp 2 ай бұрын
Thanks Cameron, your work saved me time and gave me overall understanding on the flow of version control :)
@cameronmcnz
@cameronmcnz 2 ай бұрын
Thanks for the kind words! Any time I can make Git and GitHub easier to learn, I feel I've done my job!
@POWERTOKNOW
@POWERTOKNOW 3 ай бұрын
Hi Cameron thanks for this Quick Intro to GIT and GITHUB. Very Useful but i have a a small correction to suggest : At 40:25 you mention the git INDEX gets cleared after a commit but in reality the INDEX is not cleared after a commit rather its contents now matches the latest commit . Infact the files in the INDEX can be viewed by running the command : git ls-files --stage
@cameronmcnz
@cameronmcnz 3 ай бұрын
Great comment. You’re 100% correct. I’ll try and choose my words better to account for that nuance. Thanks for keeping me honest!!!
@nareshshah2094
@nareshshah2094 11 күн бұрын
Very good video. I I learn lot.
@redwansikder3847
@redwansikder3847 5 ай бұрын
Thanks for this great tutorial.
@cameronmcnz
@cameronmcnz 5 ай бұрын
Thanks for the kind words! Trying to really up my KZbin game for 2024!
@ssingh2k8
@ssingh2k8 4 ай бұрын
Love the way you teach ❤
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks for the kind words! Sometimes I wonder if I'm wasting my time doing these tutorials. Feedback like this inspires me to keep producing. I really enjoyed putting this Git and GitHub video tutorial together!
@farazk9729
@farazk9729 3 ай бұрын
I love how you teach! You're very intelligent, both IQ and EQ (many tech savvy people lack the latter). You know not only what to say but also how to say... . Thank you so much, and new subscriber here :-D
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thank you for the kind words! I honestly really enjoyed putting this video together. It's great knowing people actually learned from it. Happy Git!
@farazk9729
@farazk9729 3 ай бұрын
@@cameronmcnz Haha! Yeah, it's like you're telling a story... with dialogues, monologues, the sequence of events, everything... and that's magic when it comes to teaching. Not everyone can do that... not everyone can tell a "story". Cheers all the way from Sydney, AU
@Kunaltwts
@Kunaltwts 4 ай бұрын
your teaching is amazing only to the point
@cameronmcnz
@cameronmcnz 2 ай бұрын
You're too kind! I'm so glad you enjoyed this Git and GitHub tutorial!
@Wiseman..
@Wiseman.. 2 ай бұрын
Thank you for the quality content
@cameronmcnz
@cameronmcnz 2 ай бұрын
Thanks for the kind comment!
@Rakeshs-eq3sj
@Rakeshs-eq3sj 3 ай бұрын
This video is so engaging didn't get any distraction... Thank you for the video....
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks for the kind words! I really enjoyed putting this Git and GitHub tutorial together. I'm glad you liked it.
@user-zu8gx5pq3f
@user-zu8gx5pq3f 3 ай бұрын
perfectly explained
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks for the kind words! This was one of my funest videos to do.
@musthavechannel5262
@musthavechannel5262 4 ай бұрын
Great teaching method there. You picked a very simple and effective method of naming the files using a familiar system avoiding extra cognitive load of remembering file creation order etc. Looked like a quickie at the end but stash makes it really useful when you want to stash changes in a file rather than the whole file. Great tutorial nonetheless. Thanks for providing it for free.
@cameronmcnz
@cameronmcnz 4 ай бұрын
Thanks! I honestly enjoyed putting together this git and github tutorial, and I've used these examples many times over the years and they seem to really hit home with people. And yeah, git stash was a bit of an afterthought, but it seemed wrong to leave it out. Thanks again for watching and commenting!
@wildanm2589
@wildanm2589 5 ай бұрын
thanks a lot for your tutorial video, it helps me
@cameronmcnz
@cameronmcnz 5 ай бұрын
My pleasure. Have fun working with Git and GitHub!
@Yeager_say
@Yeager_say 3 ай бұрын
Very helpful
@cameronmcnz
@cameronmcnz 3 ай бұрын
Thanks for watching and subscribing! I had a lot of fun putting this together. GitHub makes Git a heck of a lot easier!
@fraudude3841
@fraudude3841 4 ай бұрын
I want to know you that....this is the best git and github tutorial in KZbin,moreover I liked your teaching style.
@cameronmcnz
@cameronmcnz 4 ай бұрын
Is this my Mom posting nice things again under a puppet account?
@fraudude3841
@fraudude3841 4 ай бұрын
Nope …student from india🤗
@cameronmcnz
@cameronmcnz 4 ай бұрын
@@fraudude3841 Well thanks so much for the kind words of support. I really enjoyed putting this tutorial together. Once you understand the basics, Git and GitHub gets a lot easier!
@abhishekkashyap2206
@abhishekkashyap2206 3 ай бұрын
its great tutorial
@cameronmcnz
@cameronmcnz 3 ай бұрын
I'm glad you're enjoying it! I had a lot of fun putting together this git and github tutorial. The two tools work so seamlessly together!
@DmitriyChebotarev
@DmitriyChebotarev 9 күн бұрын
Thank you for these lessons from Russia You're a very cool teacher.
@scrumtuous
@scrumtuous 9 күн бұрын
Don't stroke his ego! 🤣
@cameronmcnz
@cameronmcnz 6 күн бұрын
Thank you so much for the kinds words. But Git and GitHub really make it easy. Regards from Canada!
@ye-xionlin6976
@ye-xionlin6976 3 ай бұрын
This vedio is so brilliant
@cameronmcnz
@cameronmcnz 3 ай бұрын
Well, it's Git and GitHub that's brilliant. I'm just the conduit. Thanks so much for watching!
@TheIntrovertsDebrief-lq4hg
@TheIntrovertsDebrief-lq4hg 2 ай бұрын
I always thought when we “add” a file to the staging area, it’s more because we need to bundle up certain files that we want to include into the upcoming commit.
@cameronmcnz
@cameronmcnz 2 ай бұрын
I don't think you said anything wrong there. Did I say it differently, because you're correct?
@TheIntrovertsDebrief-lq4hg
@TheIntrovertsDebrief-lq4hg 2 ай бұрын
@@cameronmcnz no you’re right. I misunderstood and jumped the gun a bit with my comment. Git is so confusing to me but damn this course is really good. I didn’t know the difference between fetch and pull before and it’s starting to make sense. Also, the visual guide is amazing
@cameronmcnz
@cameronmcnz 2 ай бұрын
@@TheIntrovertsDebrief-lq4hg Oh, Git can really be overwhelming. But there's a real elegance to it, and once you kinda know how the pieces all fit together, you really start to understand how the whole Git thing works. I really enjoyed doing this tutorial, and it's great to hear others getting something out of it!
@TheIntrovertsDebrief-lq4hg
@TheIntrovertsDebrief-lq4hg 2 ай бұрын
So am I right in saying that we can also add an SSH key to be able to push to origin without needing to sign in each time?
@olalekanleke3998
@olalekanleke3998 11 күн бұрын
Good video You didn't mention anything about SSH keys
@chocollinscho4637
@chocollinscho4637 3 ай бұрын
i dont know what to say am not confused anymore thank u mc
@cameronmcnz
@cameronmcnz 3 ай бұрын
Best way to start a weekend hearing that I've helped someone begin to learn Git and GitHub as much as I do! Thanks for the kind words. It makes my day!
@TheIntrovertsDebrief-lq4hg
@TheIntrovertsDebrief-lq4hg 2 ай бұрын
I understand that git checkout is not recommended. So what should be used for if you want to be on a specific commit of a branch? For example, a tester might need to test something on an older commit. In VSCode, there is a “checkout” option for that. But is there another way?
@cameronmcnz
@cameronmcnz 2 ай бұрын
I think checkout will still be used for times when an actual 'checkout' of something is needed. As of now, I don't think you can switch to a specific git commit, while with checkout it's a core feature.
@fraudude3841
@fraudude3841 4 ай бұрын
could you make shell tutorial too??
@cameronmcnz
@cameronmcnz 4 ай бұрын
You're thinking more of a pure Git tutorial that just works locally with Git and focusses on core Git commands? It's not a bad idea.
@rahmanmusah4470
@rahmanmusah4470 4 ай бұрын
i'm looking for this tutorial . i hope to find my savior here. 😂
@cameronmcnz
@cameronmcnz 4 ай бұрын
I hope you enjoy it! I enjoyed putting it together. It moves pretty fast, as my viewers tend to want to jump right in and get working with the technology. If there's anything that's unclearly, just let me know!
@rahmanmusah4470
@rahmanmusah4470 4 ай бұрын
after typing git push origin the reply i get is remote: Permission to Abdul-Rahman/my-project.git denied fatal: unable to access "..." The requested URL returned error 403 what am I doing wrong, sir?
@cameronmcnz
@cameronmcnz 4 ай бұрын
@@rahmanmusah4470 That's a credential issue. 403 is security, so Git doesn't like your username and password. And in fact, it can't be your password. You have to generate an auth token for GitHub. If you're on Windows, it might sign you in with your browser, but if that's happened before, Windows Credential Manager might have an old Git username and password. Does any of that make sense? kzbin.info/www/bejne/o2a2dJunes5mZ5Ysi=i96wTEOtVnNhATVg
@rahmanmusah4470
@rahmanmusah4470 4 ай бұрын
@@cameronmcnzokay lemme try again after watching the explanatory video. thanks, sir.
@cameronmcnz
@cameronmcnz 4 ай бұрын
@@rahmanmusah4470 Good luck. There are a number of issues you can run into so let me know how it goes!
@gavinwacira1512
@gavinwacira1512 17 күн бұрын
chael sonnen????
@cameronmcnz
@cameronmcnz 17 күн бұрын
???
@farazk9729
@farazk9729 3 ай бұрын
18:23-18:29 :-DDD
Learn Git - Full Course for Beginners
3:43:34
freeCodeCamp.org
Рет қаралды 288 М.
Docker Crash Course for Absolute Beginners [NEW]
1:07:39
TechWorld with Nana
Рет қаралды 1,5 МЛН
Just try to use a cool gadget 😍
00:33
123 GO! SHORTS
Рет қаралды 85 МЛН
Git Branching and Merging - Detailed Tutorial
54:28
SuperSimpleDev
Рет қаралды 186 М.
Learn Git, Sourcetree & BitBucket Tutorial: A Crash Course for Beginners
1:03:10
Git and GitHub Tutorial for Beginners
46:19
Kevin Stratvert
Рет қаралды 1,2 МЛН
5 Command Line Tools That Boost Developer Productivity (2023)
8:02
Git Tutorial for Beginners: Learn Git in 1 Hour
1:09:13
Programming with Mosh
Рет қаралды 2,3 МЛН
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 998 М.
Git Tutorial For Dummies
19:25
Nick White
Рет қаралды 1 МЛН
Learn Git and GitLab Tutorial For Beginners | Full Course [2024]
1:44:09
Cameron McKenzie
Рет қаралды 6 М.
Learn HTML5 and CSS3 For Beginners - Crash Course
3:54:03
developedbyed
Рет қаралды 4,4 МЛН