Git and GitHub Tutorial for Beginners
Ғылым және технология
In this step-by-step tutorial, learn how to use Git and GitHub for source control management (SCM). We start with Git. What is it? How you can get it running on your system, and how you can start working with it? Then we look at GitHub.com, a platform for hosting and collaborating on Git repositories. By the end of this video, you'll be well on your way to using Git and GitHub. If you'd like to follow along, I've included sample files down below.
📚 RESOURCES
- Sample files to follow along: 1drv.ms/u/s!AmxrofZZlZ-whOIll...
- Official Git web site: www.git-scm.com/
- Official GitHub.com web site: github.com/
- Git and GitHub.com cheat sheet: education.github.com/git-chea...
- Git Reference Manual: git-scm.com/docs
- Git Overview Book: git-scm.com/book/en/v2
- Sample ignore files: github.com/github/gitignore
- Hyper.is Terminal: hyper.is/
⌚ TIMESTAMPS
00:00 Introduction
00:40 What is Git?
02:11 Get Git
03:13 Configure Git
04:55 Get help
05:59 Initialize repository
07:19 Git status
07:53 Track and untrack files
09:18 Ignore files with .gitignore
11:23 Track all files / add to staging
12:07 Commit
13:27 Change files and view differences
16:00 Bypass staging and commit
16:32 Delete / remove files
17:13 Restore files
17:55 Rename files
18:56 View commit history with git log
19:52 Amend commit
20:48 View changes in commits
22:08 Reset to previous commit
22:30 Rebase git repository
23:12 Branches
27:19 Merge branches
27:57 Delete branch
28:30 Merge conflicts
32:16 Typical Git flow
32:37 Set up GitHub account
33:37 Create new cloud repository
35:09 Push local repo to GitHub
37:29 Working with files
38:25 Edit repo details
38:44 Issues
40:17 Pull requests
43:05 Actions, Projects, Wiki, Security, Insights, Settings
44:18 Releases
45:00 Fetch and pull
45:37 Wrap up
🖥️ GIT COMMANDS CHEAT SHEET
Set configuration values for your username and email
git config --global user.name YOUR NAME
git config --global user.email YOUR EMAIL
Set default branch to main
git config --global init.default branch main
Get help on a command
git help COMMAND
git COMMAND -h
Initialize a new git repository
git init
Clone a repository
git clone REPOSITORY URL
Add a file to the staging area
git add FILE
Add all file changes to the staging area
git add --all
git add -A
git add .
Check the unstaged changes
git diff
Commit the staged changes
git commit -m "MESSAGE"
Reset staging area to the last commit
git reset
Check the state of the working directory and the staging area
git status
Remove a file from the index and working directory
git rm FILENAME
Rename a file
git mv (OLD NAME) (NEW NAME)
List the commit history
git log
List all the local branches
git branch
Create a new branch
git branch BRANCH NAME
Rename the current branch
git branch -m NEW BRANCH NAME
Delete a branch
git branch -d BRANCH NAME
Switch to another branch
git switch BRANCH NAME
Merge specified branch into the current branch
git merge BRANCH NAME
Create a connection to a remote repository
git remote add (NAME) (REPOSITORY URL)
Push the committed changes to a remote directory
git push (REMOTE) (BRANCH)
Download the content from a remote repository
git pull REMOTE
📺 RELATED VIDEOS
- Playlist with all my videos on Git and GitHub: • Git and GitHub
- Python for Beginners Tutorial: • 👩💻 Python for Beginne...
- SQL for Beginners Tutorial: • SQL Tutorial for Begin...
📩 NEWSLETTER
- Get the latest high-quality tutorial and tips and tricks videos emailed to your inbox each week: kevinstratvert.com/newsletter/
🔽 CONNECT WITH ME
- Official website: www.kevinstratvert.com
- LinkedIn: / kevinstratvert
- Discord: bit.ly/KevinStratvertDiscord
- Twitter: / kevstrat
- Facebook: / kevin-stratvert-101912...
- TikTok: / kevinstratvert
- Instagram: / kevinstratvert
🎁 TOOLS AND DISCOUNTS
✅ 🎙️ Voicemod AI Voice Changer | 5% off | link.xsolla.com/KZBi89AY
✅ 🌐 Squarespace Websites | squarespace.syuh.net/XYaqYM
✅ 🔍 Grammarly | grammarly.go2cloud.org/SH3nL
✅ 🛍️ Shopify | shopify.pxf.io/XY9rPa
✅ 📋 Notion | affiliate.notion.so/rffva4tr71ax
✅ 🖼️ Figma | psxid.figma.com/lqjg97licpry
✅ 🤖 ElevenLabs Text-to-Speech | try.elevenlabs.io/taqepq60mptr
🎒 MY COURSES
- Go from Excel novice to data analysis ninja in just 2 hours: kevinstratvert.thinkific.com/
🙏 REQUEST VIDEOS
forms.gle/BDrTNUoxheEoMLGt5
🔔 SUBSCRIBE ON KZread
kzread.info?...
⚖ DISCLOSURE
Some links are affiliate links. Purchasing through these links gives me a small commission to support videos on this channel. The price to you is the same.
#stratvert
Пікірлер: 1 000
I have seen a good number of Git and GitHub tutorials on KZread and elsewhere, and I can honestly say this one is by far THE BEST. Detailed and not overwhelming for a beginner. Thank you Kevin!
@zahidar8340
11 ай бұрын
Exact how i feel. Thank u Kevin !
@WilsonRodriguesD
8 ай бұрын
I agree!
@stephensmakersbuild
5 ай бұрын
Agree 100%
@Artelion-pk2he
4 ай бұрын
Exactly!
@panda2cloud.
4 ай бұрын
I totally agree, the details are suitable for a beginner
I usually don't comment on videos but this one has honnestly got to be one of the most helpful I have ever watched. Thank you very much!
@dnaldoog3114
2 ай бұрын
I agree!
@cdeoliveira
2 ай бұрын
I concur
@rolszewski1
Ай бұрын
100% agree!
This video gave me the perfect start to github. I always love a Kevin Stratvert video. If I search for any topic on youtube and I find Kevin Stratvert I don't look at other videos I directly come here. Kevin Stratvert is one of my go to youtube channel. His voice is so calm as well
Kevin, this video just made my life easy! I was searching for quick tutorials on git and most of the ones I found were in the range of 2hours+. When I saw this one which was less than 50mins, I jumped on it and once I started watching I was glued to my screen till the end. Your teaching is epic! No BS! Straight to the points. You just won a Disciple.🙌
@nicomal
Жыл бұрын
You couldn't be more right. I just finished a one hour tutorial and he didn't even talk about branches (but he does have a 5 hour paid course on his website). Also you can watch this at 1.5x or 1.25x comfortably (with pauses for taking notes or running the code)
@timothykimari8154
Жыл бұрын
well said
@temitopekade590
Жыл бұрын
I agree! Great content !
@frankkuhlmann8538
8 ай бұрын
Thanks buddy. You hit the nail. No more to add. :)))))
@danfarrent2867
8 ай бұрын
@@nicomalGG
A true educational masterpiece! Thanks for your time and hard work
Absolutely fantastic! Huge fan of Git and GitHub. This kind of content is needed.
Thank you for providing this beginner-friendly tutorial, unlike many videos out there that are not accessible for beginners and assume prior knowledge. I appreciate the clarity and helpfulness of your content.
As a newbie to Tech, this was so clear in what currently seems like a very confusing and unfamiliar zone. Thanks for the great tutorial!
I have been searching for the most concise and accurate tutorial on git and GitHub. After watching this video, I got all I needed. Thank you, Kevin, keep up the good work.
Person like me who always wanted to learn about git and github but had no knowledge at all and didn't know where to start from. This video just gave me a very good start and now i know what to do with all my Powershell scripts. Cheers Kevin!
Kevin, as usual you do a great job of putting these videos together. I have tried to watch several other git videos but this one is the clear winner.
It took me so long and many people explaning it to me and I never understood it. FINALLY someone that explained it all without leaving me questioning everything. Amazing job.
the deeper get into the video, the more I appreciate.
I just needed a quick guide to help me with my initial setup. At first I was like 46mns, man I hope what I need is at the beginning. The video is so thorough and well paced that not only I finished all 46mns but had to like and subscribed without seeing another video. This was amazingly well done. Kudos!
Was trying to search for github tutorials and your tutorial was by far the best. Clear, simple and easy to understand. I appreciate your time doing this tutorial, you got a new sub!
Thanks, Kevin. In my search for a tutorial that is both concise and short, your video really fits the bill.
Hands down one of the best channels on KZread. So detailed yet so simple to follow along. Thanks a lot Kevin, you are great a teacher.
@coronaphone710
9 ай бұрын
Small thanks from me 2
This is not only the best Git tutorial I've watched but one of the best tutorials for devs in general 👏
Thanks, this is the best Git/GitHub Tutorial available on KZread.
The road to good to perfect is way longer than the road to average to good. The amount of hard work and time invested in this video (and every other videos of you as well) can be inferred from how you have focused on details. Look at the how perfectly he has integrated KCC in this video, provided link references for further learnings, listed out all the commands he has used in the description. That's a professional work + great teaching.
The best tutorial on git and github. So much information in so less time, yet so understandable. Subbed and hell I'm clicking all those ads for you!!
Excellent tutorial, Kevin! I've seen other tutorials on Git before, and I find this quite clear and useful! Thanks a lot!
Thanks a billion for this tutorial. You cut through the chase, went straight to the point and made it so easy to understand
I went from zero to somewhat GIT-competent just from this short tutorial. Really good, I appreciate that it dives right into it. Thanks!
Thank you, Kevin, for this wonderful tutorial. It was very clear and concise. You have covered the topics in such a flow that everything seemed very easy to understand. Thank you, once again. Great work!
Made a complex topic look so simple. Very well paced. Brought in all concepts and developer workflow with the same example. Brilliant. Thank you Kevin.
Great video Kevin ... and this is coming from a senior developer who uses Git on a daily basis ... I can never get enough of Git videos. I always learn something new :-)
You don't need to remind any one to subcribe to your channel, every one will love to subscribe 10 times plus after watching your videos, you are a great /born teacher. Thank you so much for sharing for free
Great tutorial on the basics of Github, very straight forward. Pace and production quality were spot on.
Great teaching Kevin, I really appreciate your dedication in helping us learn - no one explains it like you do ! Keep it up ....
So this is what you software wizards do all day long. Excellent tutorial!
Always had a problem understanding what STAGING is, by you calling it a 'Holding Penn' you took all of my frustration away. You are a genius Kevin!
Thanks Kevin for such a neat and organized tutorial. Thanks for for everything I learnt from you and will learn in future.
it's hard to not enjoy this topic when your enthusiasm emanates through the video. Thanks for the tutorial. Thanks to you, I know how to use shotcut, balabolka and now git. I may have missed other software but you really know how to make tutorials
I had to watch this video twice over the span of 2 1/2 days, and I took notes on absolutely every point! Thank you for this!
Kevin, you are the best at simplifying this content for new users, I appreciate it so much!
I learning how to use Git and GitHub, I feel this is a one stop tutorial. I am just watching it over and over
Thanks for another excellent educational video. Clear, well laid out and easy to follow along.
Best git tutorial ever. This is the first time I understand git easily. Thanks.
Omg, the best git and GitHub tutorial...you saved form confusion and saved me time too. The delivery was very good. Thanks man.
you explained everything so easily! You are a very good teacher.
You’re incredible and such a great teacher!
@KevinStratvert
2 жыл бұрын
Thank you! 😃
@reasonerenlightened2456
2 жыл бұрын
@@KevinStratvert too many clicks and stuff to remember. Computers are supposed to be getting smarter,.
@yorickvlt1021
8 ай бұрын
Mans living in an alternate reality
I can't even begin to explain how grateful I am to you for this amazing video. You made things look so easy. Thank you for all your time and hard work.
i'm just halfway through the video but i'd like to thank you. you'll never know how grateful i am to you.
Fantastic video Kevin, it is designed very systematically to understand the entire flow of GIT and GITHUB perfectly ...Thanks for the video
Dear Kevin I am doing Masters in Computer applications. I have been watching your videos for a long time and I really like videos. couple of days I decided to learn git and GitHub after watched some videos on KZread I got so board I was think that I wish kevin should have a video on git ang Github finally I today I saw the video on your channel I am so happy to watch it Thnank you so much
I've been messing around with git for about 4 days, it was not going well. This video helped A TON. Thank you. I am very glad you started from the basics of getting git working first on my local computer.
Thanks, Kevin! You make every subject seem easy and doable.
excellent tutorial Kevin! you are unique in your teaching styles. I have watched several videos on this topic, but l always end up confused, thank you for great piece.
This was a really comprehensive overview mate! Really impressive. I not only now know how to install, edit, construct repositories correctly and efficiently in the Git style, but I also now know to connect to GitHub. Most importantly of all, I now know why I'd bother doing any of it at all and how much of a game changer it is for my projects in general and my workflow in particular. I can't remember how the algorithm pushed me along to your video (I think it was a general search for System Analysis and Design re: Uni project) but I'm so glad it did. Liked and subscribed 😊
OMG! I have watched so many videos but nothing like this. Thank you so much, This video is just pure gold, straigth to the point.
Not even finished watching but every time I have a question Kevin answers it right away. This is great, kudos!
This is an incredible video. It may be a little different sometimes (such as git checkout instead of git switch on older versions, possibly, ymmv), but overall it's a big help to anyone just starting their Gitventure.
A really well thought out , easy to follow and comprehensive tutorial. Thank you.
first time i watched git and git hub tutorial completly in one go.. best tutorial ..
My god this tutorial is awesome. Ran through a whole project in no time. Great stuff.
thanks Kevin!!! I just fetched and merged knowledge from this video
Kevin is really a great teacher.
One of the best Git Tutorial I saw on KZread. No hand waving unorthodox layout and OS like the most popular video that make it impossible to follow along.
This is the most complete and easy to catch up GIT guide I have encountered on YT! Thanks man!
9:54 If anyone had the same problem as I did where I couldn't change the file extension, click View -> Show -> File name extensions :) Edit: just finished the video. Absolutely fantastic!! You taught a lot of the things they didn't teach us in our Python classes, thank you!
@firebro4life
4 ай бұрын
You are a real one for that! I was spending like 30 mins remaking the file trying to understand why it was not working!
@hxybrid3110
4 ай бұрын
thanks man
@christ4ever809
3 ай бұрын
tysmmmmmmmmmmm broooo!!!!!!
@Jameshowardadventures
3 ай бұрын
i cant find a "show" in my view tab. you know what i should do?
@christ4ever809
3 ай бұрын
In your view tab, there should be a show tab which contains hidden items , navigation panel, file extensions options etc bro. @@Jameshowardadventures
This man is a great Teacher. He can simplify concepts a lot, just like CoreySchafer, a great Python programming instructor. Weldone sir
I just want to let you know every time I search about anything, you don't know How happy I am, just to see your face, or your uploading a video about the things I want to learn. Keep up where you are the best.
This is a guide I regularly refer to for working with git and Github. Appreciate the simplicity!
Hey Kevin you know what, I was just thinking this morning to storing my scripts in Git and thought to see some videos on Git to explore in detail. But here you are, this might be the butterfly effect, my thought here reached to you and you've uploaded what I wanted. Amazing. . . !!!! BTW, thanks a lot, loving your content. Keep rocking.
@zachalexuy449
2 жыл бұрын
also me github making roblox scripts GO BRRRRRRRR
Kevin, I didn't even know about these things until now! You are a really good teacher and I am so glad you decided to quit Microsoft and become a full time KZreadr because you have been making technology a lot simpler for people like us!
This is the best Git & GitHub tutorial available and it's not even close! The fact that you didn't use any code editor magically demystified Git for me. Subscribed!
I didn't understand Git and GitHub well until I found this tutorial. Thanks, Kevin!
For users having an issues with the master/main change sticking, you may need to run "git config --global init.defaultBranch main" rather than "git config --global init.default main"
Great tutorial, hands down the best one I've seen so far! Heads up though! For some users, including myself, the command for renaming the default init branch wasn't working. Correct bash command was: git config --global init.defaultBranch main very subtle distinction but it worked for me!
@melissakinney7896
Жыл бұрын
@prism_schism I tried both and neither worked for me. @KevinStratvert your video is EXTREMELY helpful otherwise - do you have any other suggestions?
@PorfiriyPorfirievich
9 ай бұрын
@melissakinney7896 In newer versions of git when installing it on your machine you can specify the name of the default branch to be main. So if nothing helps, I'd recommend just reinstalling git and specify that.
Man you are so gifted in teaching. This is what I lack in many youtubers. Thank you so much for this amazing video. Keep rolling!
Three years later and still the most relevant and to the point git and github tutorial
I play classical music for my chickens
@legokangaroo5010
2 ай бұрын
When you say you're chickens, do you mean pet chickens that live with you? Or chickens that you use to get eggs and eventually kill?
@mervat3140
2 ай бұрын
What is the instrument you play it for your chickens
I need to learn more about database because the country where i live they need more people who are graduated IT Course and knows well about DATABASE
@nitrotech9701
2 жыл бұрын
Please what country if I may ask. I have a background in IT. Can we link up.
@alrik111
Жыл бұрын
M
@alrik111
Жыл бұрын
Emil.. Om att. Mm M I'll keep.
@mrcontrol111
Жыл бұрын
@@nitrotech9701 Dubai - UAE 🇦🇪
@cleanlinessexpert
Жыл бұрын
How your level in 8 Moonth?
This is the only tutorial that I was able to follow through successfully each step till the end! I've watched a few other videos and all suffered the same fate, got stuck in a particular step that they showed and couldn't proceed. Thank you so much Kevin!
This tutorial is the best I have ever watched. I really appreciate this.
My chickens play classical music for me
If anyone is having issues with the .gitignore part............avoid saving the file as a text file (it needs to be saved as a file with no extension through which ever editor you use)............using Notepad didn't work for me (even when trying to resave the file by encapsulating the file name within double quotes).........I basically had to open a new file in Notepad++ (do not create the file within File Explorer as it will likely use Notepad by default)...........I then saved the file with the filename between quotes after creating the new file through my Notepad++ editor..............and it worked.
@percys8774
Жыл бұрын
Thanks so much, this solved it.
@jofolky
Жыл бұрын
Thank you!! Worked for me as well
Deeply appreciate the hard work you put into this....Very exhaustive, thorough and apt. The best you got here
Dear Kevin, thank you SO MUCH for the work you have put into this video, and for delivering a clear, easy-to-follow, highly educational tutorial on a much-needed topic. KZread must reward excellence!
This is NOT for beginners, you talk like we're supposed to know every concept you say, which is not the case for most people getting started in programming world. And I'm saying this as an experienced programmer, not a noob.
Much needed tutorial, thanks Kelvin, as always you are awesome 😎
This is genuinely one of the best Git & Github tutorial! Thanks !
Just pushed 3 projects that were giving me hassles for the past 3 weeks. Thank you for clear guide. You're the best!
If i am to rename this video, it's gonna be life made easy....one of the best i have seen so far! Many thanks Kevin.
In 5 years of trying to watch a video to learn about github etc, this one is the last one standing. Well done haha
The best git beginner level tutorial to me! Thanks a lot!
Excellent explanation Kevin, so well-structured and pedagogically well presented. Many thanks!
You're to be commended for your efforts, [!] I've learned so much from you, in just the first video alone, "it's amazing!" Thank you so, very much, for Your help and taking the time to bless mankind with your Teaching!!! Your easy to learn from and as I see it a plethora of information. Teachers need to be appreciated as much as we as a whole can do!
I have seen this 2 times already. This might be the best Git summary ever made. So incredibly useful. I am coding again after a break and I needed a refresher. This was absolutely perfect for that. I even learned a few new things. I would thumbs up 30 more times if I could.
brilliant. Ties together all the elements i was shown randomly at work in a logical easy to understand order. Thanks Kevin
Fantastic tutorial. Thank you for the hard work and effort Kevin.
best git & Github tutorial that includes concepts,explanation,application with a live demo!
Thanks a lot for this tutorial: Easy to understand, not overwhelming, practical with no fluff.
Thank you. I learned more about GitHub from this video than from anyone that I know.
What a life saving tutorial. Bless you Kevin.
Thank you, I kept on delaying more about Git as I found the content of other videos and the process of using GIT quite daunting. You made it look so easy I am not wondering what I was afraid of. Great video!
This is the absolute best tutorial of git. My gosh. Thank you!
Would recommend this video to any beginners out there looking to start Git and GitHub. Very, very helpful and insightful.
One of the best, if not the best, tutorials I've seen. Thanks for this.