Complete Git and GitHub Tutorial
Vložit
- čas přidán 6. 06. 2024
- This tutorial will help you with using Git & GitHub for your personal projects and contributing to Open Source, with no prerequisites, in an easy to understand language.
It starts from the very basics of Git & GitHub, covering all the essential commands, including concepts such as branching, pull requests, forking, etc. We also cover other concepts such as squashing, resolving merge conflicts, keeping your code in sync, and more.
NOTE:
- Windows users can use git bash, all the commands will work.
- When using git for the first time, set the global configs using the commands:
$ git config --global user.name "your_name"
$ git config --global user.email your_email
Git/GitHub cheat sheet: education.github.com/git-chea...
Download Git: git-scm.com/downloads
Complete Java DSA playlist: • Java + DSA + Interview...
Code & notes for DSA lectures: github.com/kunal-kushwaha/DSA...
➡️ Connect with me: www.techwithkunal.com
=========================================
Timestamps:
0:00 Introduction
0:25 What is Git and Github?
3:45 Why are we using Git and Github?
5:15 Downloading Git
6:00 Structure of the Tutorial
6:18 Some basic Linux commands
8:22 Initializing a Git Repository
9:48 Making the first change
13:43 Staging the first change
14:40 Commiting the first change
16:12 Adding data to files
17:24 Removing changes from stage
18:14 Viewing the overall history of the project
18:52 Making few more commits
19:31 Removing a commit from the history of a project
21:35 Stashing changes
24:25 Popping Stash
25:00 Clearing Stash
25:26 Starting Github
26:10 Creating a new repository on Github
26:40 Connecting Remote Repository to Local Repository
28:05 Pushing local changes to remote repository
28:43 What are branches?
31:10 Use of branches
32:42 Making a new branch and switching to it (Learn Git Branching)
34:28 Merging branch to main (Learn Git Branching)
36:00 Pushing new changes to master branch
37:10 Working with Existing Projects
37:38 Why Fork and How to Fork?
39:00 Cloning the forked project to local
40:10 What is Upstream and adding it to local
41:00 What is a Pull Request?
45:28 Never commit on main branch & creating our first pull request
51:04 Removing a commit from the pull request by force pushing to it
52:56 Merging a Pull Request
53:28 Making forked project even with main project
59:46 Instructions on how to try doing these on your own
1:00:20 Squashing commits
1:01:59 Using the Rebase command
1:04:35 Using the hard flag to reset
1:05:11 Merge conflicts and how to resolve them?
1:11:00 What to do next?
#git #github
DSA + interview preparation playlist: czcams.com/play/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ.html
how did you transform your terminal?
@@inishkohli273 Even I have the same question, Do you got any solution?
If so please let me know too.
Thanks in advance.
@@akashreddyjammula you have to import iterm2...I tried hard but still couldn't manage to replicate...
Seen many git tutorials in the past. Had been using git for quite a long time now. But this is the best and most easy to understand tutorial I have seen so far. And I learned quite a few new things too, in the easiest way possible.
Thank You!
@@KunalKushwaha I think you have missed the configuration of the git
@@ksubramanyeshwara6169 bro configuration is simple ...no need to worries
@@ksubramanyeshwara6169 Mentioned in the description
@@KunalKushwaha Thank you so much
Keep in mind that to make changes to your text file using vim , Press i to get into insert mode and then press esc + :x to exit ; Basic Vim commands, you might get stuck ;
thank you bro
it was a great savior.
thank yo
thank a lott[you can use ctrl+left closed bracket if your esc isnt working]
thanks man
Honestly blown away by the content. Having already seen quite a few git/github tutorials in the past, I started watching the video with the intention of skimming through the content quickly but it was so engaging I ended up watching the whole video. None of the previous videos I've seen were this good, thanks for putting so much effort into the videos!
You are the only one who made me understand the entire git and GitHub only in an hour. I was stuck in an endless loop but one of my friends told me about this video and I am really thankful to him and you as well.
If you know about something and can explain it in terms that even a 3rd grade student can get it, shows that you truly understood it. Begin a professional, going through your content is fun and just love the way you break things into simpler ways. You are going big, brother.
Hope to help you in some way and help the community.
The guests goes to the stage (staging area) , then the photographer took the photograph (commit) that saves in the history of the wedding 🔥🔥🔥, this was amazing
Took me around 4-5 hours to complete the video but truly they were worth it. I understood each and every one of the concept . Totally blown away by the content.
The picture clicking example was perfect for beginners like me. Really enjoyed the tutorial and understood the commands used. Kudos to Kunal for creating this tutorial.
I've searched alot about git watched tons of videos on youtube googled alot whenever i want to do something with my projects on git. I never understood concepts of stash, rebase and all. I would like to say "BEST VIDEO ON GIT EVER". Appreciate it! By the way excited to see more videos like this. Great initiative man!🙌👏
this is literally the best git and github tutorial ever, i was able to understand the complicated parts that other tutorials couldn't explain well. thanks a lot
Sry i should be commenting after watching full video. But i can't control myself. After watching for just 11 min i am really happy that I could understand what u r teaching. This thing called github and its repository concept used to go a way abv my head bf. Now i am atleast able to understand. Thank you !
The quality of the content, excellent presentation, and positive attitude make it really interesting and fun to watch.
The fact that the views are more than the channel subscribers is a testament to this :)
just completed the video i had watched plenty of tutorials but finally understand with the help of your video thank you so much for your tremendous effort also you have explained it in very easy language exapmle that you have took of wedding was just amazing i am very lucky to be member of this community lot to learn from you, thank you
Thanks Kunal .... for all the efforts ...that you have taken to provide world class content at zero cost.... for the same content many edtechs are charging lakhs of Rs. Gratitude, blessings and more power to you ... that you keep doing what you do best and making us all Indians proud....
Your passion for teaching shows Kunal, hats off for this. Thank you.
I liked how well you arranged java with data structures. I saw your dsa roadmap videos and that is by far the best roadmap and now you are teaching that by yourself. Thank you so much for this hard work that you are doing for students like us.
Only video on YT which tells about Git & Github completely and in the most easy language 🔥🔥🔥
amazing way of explaining by comparing it to wedding photography, i had my git open and was following along each step, and in just first 15 minutes of the video i got a good grasp of the general environment of git and github, and how it is used to maintain changes in the repositories, thanks alot for the video, it is really really helpful.
Git has never been so easy for me. Thank you so much for explaining this well. I have tried to learn git many times but often need to memorize the commands even the basic ones. But your wedding photograph analogy did the work. Now I understand everything nicely. Thank you so much.
I'm very grateful and blessed to have a mentor like you, really appreciate your work.
This is the best tutorial for Git and Github I've seen so far !! Your concise, on point teaching method is really wonderful.. I understood most of the concepts clearly.. Thank you so much.. You have a really nice way of teaching things...
That expression at 24:00 says “that’s how I roll”❤️. Epic man. Hats off to your efforts. I’m halfway through but I’m thoroughly enjoying this.
The Smile on Kunal's face after completing every part of teaching is amazinggggg!
I had never seen a educational content this long in one sitting, you have got it bro! keep it up!
Bro literally loving the way you are explaining the things...your efforts are clearly visible man❤️🙌 really got goosebumps while studying due to excitement that what's going to be in next videos. It is going to be a long and wonderful journey⚡
Your explaination for branching and pull request concepts is Amazzing!! This is the best git / github tutorial ... Thanks a lot!!
watched mostly every popular git tutorial (Hindi and English both) but no one explained like you brother. Really appreciate your work and thank you for providing such great content,
Thanks a ton
Amazing what an explanation I never find such an explanation ever. he took the real-life example of wedding and explain the git very easily.
Thank you for this in-detail explanation, it is put across in a simple and best way possible. Have been struggling with understanding this and getting started with git and GitHub. Thanks for making my life easier.
I was looking for tutorials to learn git and git hub and i found your channel and i was just blown away by the content brother. As i have just entered in tech industry i got to know about lot of new career opportunities today for that thank you and looking forward to learn and help and grow in the community ..hope we will meet one day .
Thank you. Was struggling with git commands since years. This was the best and simple explanation. More power to you.
I tried 5-6 or even more times to learn git and github but this day is remarkable for me because i finally learned all the concepts in a very clear manner just i have no more fear of all the git commands thanks kunal bhaiya 😁
he is using git for linux or git for windows
@@nishantarora6219 git for mac
Can u plz help me I'm stuck at commit for more than 2 days now it would be grt help if u can help me.
@@arpitanjana4994 sure
If i have forked a git project in local, after that I create a new branch to add new feature, but in b/w owner of the project make some changes, then where do i pull changes, in main or in new branch and if i pull changes in new branch does my changes got lost, pls explain ?
It's indeed amazing explanation. Everything is clear and crisp. Can't thank you enough 👏
same here, I too have watched plenty of git and GitHub tutorials but this one is exactly how a tutorial or explanatory video should be. Very well constructed wherein Kunal is not only teaching you how to perform various command but also clarifying you why would you need them at the first place. #respect brother
Aww....thanks man...
Your way of taking perfect examples to explain the concept is tremendous....
The wedding photographer example made it crystall clear for me to understand it so well that i would never even have to remember anymore..😁
Thanks Kunal bhaiya.....
for providing such amazing content that too for zero cost 🥺🤗...
Kunal you are seriously unbelievable
Finally the series has started🥳🥳
This man is the best had watched many tutorials in the past and no one explained me like this,starting my open source journey
Thank You
Kunal you've made life of a beginners quite easy who aspire to be a Java Developer . Much Thanks !! and may you continue this
Kunal bhai you have ignite a flame in me to become a devops engineer. Thank you so much. I will work hard come what may as per your videos directions. Lots of appreciations and love.
Straight from the heart -> One of the Best tutorial I've ever seen in my life...
Helped a lot! Was always scared of git and used to just contribute using GitHub but now I am confident about Git as well. 🔥 You and Eddie are so good at this!
are we supposed to practice along with the video? i watched and understood it but feels impossible to actually do. i'm new to this.
Man. you are really a good teacher. I feel very bad not knowing your channel till now. Thank you very much.
Never seen such an eady explaination of Git. Thanks Kunal for making me understand this very easy!
This video is genuinely amazing 👏. Everything covered in the proper order and in the nice way 👍
This is actually the best git / github tutorial
Thank You!
Second that ✌️
Yes it also increases the SEO part too with this 🔥
@@KunalKushwaha I am a window guy. And I face a lot of problem due to any tutorial taught on Linux or Mac. Can u suggest me some things to cope up with this.
@@amitgupta2890 I mentioned it already. When you download git, you can use git bash and all commands will work. Please read the description.
This is the best tutorial on Git and GitHub so far. Thank You Kunal!
The bestest tutorial on Git and GitHub! Kunal you have a gift of making things so easy that any person from any profession can understand it! Can't wait for your next video on DevOps! Thank you.
You are most welcome
Finalllyyy the day is here! Aug 1st All the best kunal kushwaha we hope that we will be learning a lot from your videos and your experiance
Clean tutorial. I have seen many videos, but Kunal is doing it the fresher's way.
Thanks a lot to be a good tutor!
Your analogy of the wedding picture makes it so easy to understand. God bless you man
I never comment in general but I thought I should share this.. I've watched infinitely many videos in CZcams, paid for courses on this topic but this is the best one... No words..
Thanks Kunal
I've been using git for a while now, I still learned a lot from this git tutorial. Hands down one of the best git tutorial I've seen.
Finally the wait is over....here we go... thank you so much for your efforts...🙏🙏
Your preparation playlist is awesome! Thank you for providing quality lessons and tutorials for youtube.
Best Tutorial on Git I've ever come across. Thanks for this Kunal
Best content 👏this is the only one needed for any tech enthusiast student !! Thank you for bringing this
Strictly 24 K Content, Thanks Kunal for making the concepts so simple. Always a fun session to learn from you, Cheers buddy!
the simplicity of explaining the concepts. hatsoff dude
short, crisp and clear, love the content, and the way of explaining
I was waiting for a proper guidance..🙏🙏 Now I got one.. 🤝🤝Best wishes.. My journey begins 👍👍
The example of photo clicking in a wedding is amazing. Awesome content
One of the best course I watched CZcams. I'm your early subscriber. But now only I get time to watch. Thanks for the amazing course, sir.
Great Video. You have covered a lot in one session about git and GitHub. Learnt a lot of things from this video. This one session is enough to trust you for DSA sessions.
Very nice explanation by Kunal.
Whatever he has explained here is more than sufficient to also work in real world projects.
I am working in an IT MNC and I started using git 3months back and trust this video covers all the commands I have used so far.
We have multiple people working on same branch and stash comes handy that time.
Good work Kunal!
Thank You!
hi, can anyone help me with this - what did he press at 16:24 after adding names.
@@bhanumalhotra7553 :wq --to save and quit
press esc to enter the command mode first then, :wq and press enter
Applause to your effort 🥳keep going😁this good actions provide u all
This is the practical Git and Github tutorial we need thank you very much.
Hands down the best git/github tutorial. Thanks Kunal.
And finally the much excited series has started🤩🤩🤩🤩
Rakesh ... Java related stuff kab ayega ?
@@John12685 syllabus m likha hai
@@shashanksingh4708 Where is the Syllabus, Can you please share it, I could not find it on Discord or Channel Description.
i had checked out a few other git tutorials.. honestly speaking this one is the best, he literally makes concepts crystal clear. No bogus talk.. nothing unnecessary straight up to the point. thanks kunal
Thank You!
The best Git and Github tutorial ever. your turn this confusing terminologies into a simplier terms. thanks a millions
I am writing this out of necessity even when i am only 12 minutes into the video right now! I have been into DevOps learning environment from last 3-4+ months now. Bought numerous courses, found numerous articles and tried my hands on anything and everything. I know a little about Git and started this video just out of curiosity while playing football manager but this by far blows them all away that too at no cost to me. You make it feel so intuitive that i am learning Git from a new perspective while playing a game. Massive props to your comprehension of Git!
So much to say..
You nailed it! 🔥❤️
You recorded the video at 1st Aug and uploaded on the same day.
That wedding example was so good..
Even a person from other stream/field can also understand this
Hey Kunal, I am watching your video for the first time. And you won't believe that I am literally praying to god after watching this video that I was struggling in git and GitHub for the past 6 months.
I was facing many difficulties like merge conflict, fetching the upstream code and pull the code,and even working with the branches.
And after watching this video, I have tried every command, and literally, now I am crystal clear with Github, even with the branching best practices.
I really thank you a lot for creating this video and waiting for the entire course of DSA.
This video of git is just amazing ,I didnt know ,there are so many hidden topics but you cover them all easily .Loved it, big shoutout to this video 😀
Wow Kunal, this is the best Git tutorial on youtube. The added chapter makes it useful for everyone regardless of their experience with git. Kudos!!!!!
Bro i have the same profile in my other account
Kunal bro you nailed it , literally you where on fire 🔥🔥🔥 this was just.....hats off!! This was definitely far better than some paid courses
Hey kunal, I just noticed there's no ad on this video....we really don't mind if there are any ad and you are earning from it.... we'll never skip ad on your channel since you are providing quality courses for absolutely free
This is best GIT and GIT HUB course ever seen.. Kudos
Sir you are the only one who made me understand the entire git and GitHub only in hour ...I was stuck in an endless loop but one of my friend told me about this video and I am really thankful to him and you as well ...thanku very much sir
Firstly I find this video too fast to grab. But I know kunal is giving a quality content so I start giving some efforts from my side too and continue watching it a couple of time and finally I understood everything and I find putting efforts from my side worthy.
So If you are finding the video too fast then be focused while watching and put some efforts from your side too because the content and explanation is outstanding.
Thank You! Hope you liked it
Thank you for this amazing tutorial! Nobody in youtube have been able to teach git and github the way you did.
Glad you enjoyed it!
di can you help me with one of my doubt ?
Awesome way of teaching. Complete tutorial. Best git and GitHub tutorial came across.
The best yet. Scrolled almost whole youtube, but man everything was repetitive with same definitions, you brought new things to learn. Thank you for that!
but I felt like it went a bit confusing with "making forked project even with main project". Maybe it's just me, anyways great video nonetheless. Thank you!. I will try to review it again.
I am watching your lectures at 1.5x speed and your "taa-daa"s sound so funny and enthusiastic.
Hey Kunal, I always struggled with Git in interviews. Saw this video before my last interview and practiced along. Was able to do good this time. Thanks mate!
Edit: Got offer as well
most comprehensive and to the point. Awesome buddy. Keep it up!
My senior told me that Git and GitHub is very Important in Industries. I wanted to learn but was afraid by the Terms pull,fetch, rebase.
But saw this video and was not knowing when it got completed!!
Thanks for making this video!!
I learnt lot from you regarding java which killed my life of unemployment
Finally landed in a job and now in project.
You are really a best teacher of mine.
Thank You Kunal ❤️
Hey Congrats🎉 I am not good at maths can I still learn it?
Watching from Nepal, who has a dream to work on FAANG companies. Really excited for this course.
Can you help me? Maile ta kei ni bujhina. Git ma first time vayera hola
thank you soo much bro... i have watched many git tutorials but i couldn't undrstand anything that what, why and how git is used and the link between git, git hub and its work flow...you full filled all about git git hub through this single 1hr video...thanks for your dedication towards making learners to understand easily..i hope that you do more videos through this platform..Love you bro and thank you.
This is 24k gold...The great way of teaching ❤️ #respect🙏
A simple note : at 16:28 kunal used vim text editor and opened names.txt file to write some text names and saved the file using (first press esc key then) ":x" hope it is more clear now :))
Now the journey starts 🔥🔥🔥🔥
Bro how is your journey going so far?
bro journey?
@@sanketneema286 procrastination ,
Best git tutorial available on entire youtube. Thanks a ton, Kunal
I have seen many videos on Git and Git hub, by far this is the best video with simple explanation. Even a school kid would understanding well. Great job!! 👏
Glad you liked it!
Amazing now we have started the journey of DSA
Couldn't be simpler! Thank you for this amazing video :)
Glad it was helpful!
@@KunalKushwaha iam getting error src refspec main does not match any
Can u help me
@@sudeepk.s1581 Hi I'm not sure if the problem is already solved but you had to git branch -M main.
best on git, best on YT, best explanation and thought flow!
Your lecture has made my day!
Kunal you are explaining in such way that anyone can understand. I really liked your teaching keep it up!