Git & GitHub Crash Course For Beginners
ฝัง
- เผยแพร่เมื่อ 30 ก.ย. 2024
- In this Git tutorial we will talk about what exactly Git is and we will look at and work with all of the basic and most important commands such as add, commit, status, push and more. This tutorial is very beginner friendly.
DONATIONS:
We spend huge amounts of time making these videos available for free. Any donation is greatly appreciated
www.paypal.com...
I just wanted to say thank you for this great video! 💙
What is git?- 0:34
Concepts of git - 2:18
Basic commands - 3:14
Installing git - 5:43
touch (command) - 10:15
git init(command) - 11:33
username/email configuration - 12:43
git add (command) - 13:20
git status(command) - 13:35
git rm - -cached(command) - 14:00
git add *.html (command) - 14:22
git add .(command) - 15:00
git commit(command) - 15:50
git commit -m ' ' (command) - 17:43
.gitignore (documentation) - 18:14
git branch(command) - 21:50
git checkout(command) - 23:30
git merge(command) - 24:46
GitHub new repository - 26:15
git remote(command) - 27:46
git remote add origin(command) - 27:54
git push -u origin master(command) - 28:07
git clone(command) - 31:00
git pull(command) - 31:33
Prod Engineer thank you Prod
Thank a lot for this !
Absolute hero
Really nice - thanks
Haha was looking out for this. Thanks Prod
Thank you very much for this tutorial!
I've followed your beautiful course in Udemy on Vanilla Javascript and I have to say that
you have the gift to explain all clearly.
Thank you again!
Paolo Maria Guardiani
Man I had just watched a 1h video on this, and I completely hated how overly complicated things are in git and github, now just by watching you do it, I'm up and running. Thanks a lot!
I really enjoyed watching this video. Thank you so much, I can now use git and GitHub.
Super useful and right to the point for beginners!!!!! Thanks!
Thanks a lot ,nice work ,well done
OMG, you are a savior. Thank you so much
Thank you for putting this together.
you taught everything very well and thanks for this video ... one thing i am thinking about ..what if i have to undo my merge or let suppose i merged my branch mistakenly then how do I revert it ???
Great Tutorial thank you so much
so helful for me ....we are wont meny more tricky videos on web devolpment
Thank you Brad Traversy!
nice but i think you forgot to explain/show the most important part about git, how can i go back in time at a certain checkpoint and start the project at that time...
@Abdelwahab Bounasser When using this on a cloned project I can not see any older versions, is that intended? If so where are those saved versions actually saved then, just curious.
Thank you for the clear explanation! :)
19:00 ... finally loses his sh*t with the notifications going off in the background ... "Jesus"
It's not notifications, he is typing and the focused window doesn't allow text to be written and Windows doesn't like that.
@@LaughingOrange My bad. Same end-result though. ;)
get a life...!!!
awesome tutorial!..
Thank you very much!
great video!! thanks :)
Git! a Severely complicated version of 'Save As'
- Confucius
Confusius :P
**confused Confucius noises**
@@AbhishekBM * kong fu
@@DomodossolaTune Hahaha thats the first word got on my mind too...lol :)
made my day
people who are watching during the quarantine [stay in, stay safe, and learn a lot ]
just what I thought... gotta study somehow with all unis closed:)
what else can we do
superb video explaination. landed at the right place
Let's go quarentine team
This is so good.
*error sound*
*error sound*
Whispers “oh Jesus”
That’s real life
Hahaha
I agree
Ernie
That's Windows
That's not editing your video.
@@danielfrei6213 LMFAO
I was on the verge of giving up on Git. Lol. Thanks man, I'm now confident with using it.
I cannot tell you how much you have helped me Brad. I am almost done with my Web Development degree, and I feel you have been the difference.
That is awesome. That's why I do this
i have the same feeling ... it was very simple n easy to go along with the lecture ... :) thums up
I really hope people are donating...even if its just a few dollars.
Where are you doing your Web Development degree?
thanks man :)
"Git is a Virgin Control System"
I feel personally attacked.
Mark Wahlberg sure knows a lot about Git
lol, I get that a lot. Must be a Mass thing
hahaha I can't unhear it now
lol same.
I can't not hear it now >.
"Say hi to ya mother for me, OK?"
"I'm going to go ahead and GIT started"
You git XD
Well, git on it.
@@deeneyugn4824 I'll just git home first and git my computer out of my bag and git on with it
HA! I Git it.
pitter patter, let's git at 'er!
I simply like your tutorial. Clear, straight to the point.... I've referred some of my friends to this git tutorial. Thanks
Good to hear. Thank You!
For those who may be finding this video after October 2020 just know that there was a patch wherein 'master' branch has been renamed to 'main' going forward! Hopefully this helps somebody.
Me! Tanks for that confirmation. This is what I thought and paste in Git. But I have an error message telling me "failed to push some refs to 'github.com....". I did every step though, I must have missed something...
github removed their support for password logins to push. Do you have any newer videos explaining how to push with an SSH key or one of the other alternatives? I still don't really understand what that is and am a bit frustrated. :(
just replace 'main' with 'master' and it wont req anylogin
like this: git push -u origin master
Thank you sir. I've been ignoring git for way too long and this was exactly what I needed. cheers
me too! Very helpful. Thankyou.
The spectrum of Brads content is very broad in the programming realm.
You've come a long way Brad, hats off to you my friend.
I agree. He's typically giving free tutorials for a whole IT department
For people watching this in 2021, master is now main. Don't be alarmed by git push -u origin main
thanks, was the 'master' changed to 'main' for 'political correctness' reasons?
@@amalldekan1432 I believe so, yes
@@amalldekan1432 yes, in support of black community.
Tried this tonight. Main failed for me even though that is what is listed in the steps. Then tried master and it worked.
Thanks for taking the time to make this video. I have returned to web development after many, many years away and there's so many new things I need to learn. Your videos have been a tremendous help.
Idem
I learned more from you in half an hour than I'd learned in several hours on my own. Thanks.
please explain wtf commit is
@@MKermy bro, with commit what you do is to create a new version. For example now i am committing, so a new version is being created. If i do some changes, deleting or adding etc. and commit again, a new version will be created. But i can still look at the older version since its not deleted. I hope its clear?
@@semihozturk9665 ohhhhh
Damn you are a slow learner
@@semihozturk9665 so it's the same as autosaving, except it's manual? Is there any advantages for a single user project over just using an external backup drive, and copying to it every time i save the project?
Brad you are the best !
Thank you so much for sharing your knowledge with us :)
Who else is learning during Quarantine?
I am, learning shouldn't stop.
no quarantine, but on lockdown. hope you feel better soon!
no iam not learning but just trying not to distract myself to suicidal thoughts, fair enough, iam bestowed and enlightened
I'm suicidal too
@@DanteHellDrive Heyy yes you are.. don't let negative thoughts sneak in! God bless.. you can talk
This turorial was one of the best tutorial I have gone through as a fresher for Git.
..Thanks Man for this wonderful session.
9:15 You will see the virgin you have; yours may be different.
LUL
I scrolled down looking for this comment
This video was great! I was struggling with figuring out Git from online articles but I believe this is all a beginner needs. You've shown how basic commands work very intuitively. Thanks.
Even after 6 years it's still great.
Brad, I spent many hours with another TH-cam instructor trying to figure out Git and GitHub and while she covered the basics and I got a general understanding, it was this video that really "taught" me. You go through things in a clear, concise, and well paced format that made it all come together very nicely. I very much appreciate it (I have watched and learned from your videos before and have no idea why I did not start off on Git/GitHub with you in the first place.) Thank you ever so much! I have given you a thumbs up and subscribed and look forward to more of your teachings.
8:56 for demo (skip intro and installation)
My employers be like how tf did you learn git in a short time, it's all thanks to you Brad Traversy!
I am Portuguese(Brazillian). I've learned so much watching your videos. Your voice and english speak is so easy to hear or I am understand english very well xD
I noticed that when you pushed to GitHub and cloned the repo, git didn't use the .gitignore file because the log.txt and the directory ( forgot if it was dir1 or dir2) are available from github. Why is that?
Git won't push empty folders.....
This is The Best Git & Github guide I have ever found. Keep up the good work man.
1 I'm using VS for my editor and Linux Ubuntu for my OS. The default folder is Home. So, when I choose the Add to the Workspace from the File pulldown that's which folder it goes to. And when I use the touch command that is where the file is opened. So, I'm assuming that's ok
2 So, I can clone any publicly available code using the instructions that you've outlined?
3 Other than logging in to one's own profile, is it necessary to use RSA encryption to push files? ( that was something that was not covered )
4 I understand that when git adds, it's tracking files and the changes. Does commit 'save' those changes?
This was thirty minutes well spent. Thank you
This is a great tutorial for beginner like myself. I started from very beginning. Installed Git, Atom and created account on GitHub. I was able to create local and remote repository, create new files, clone, push etc. Very worth the time to see this video. Great Job! Thanks!
"Oh man, this is slow!" :D Nice tutorial, thanks.
*I have a video on getting started with git and Laravel to push your first project*
thanks
👍
@15:03: What's the issue with git add *. We can use that, right? I mean, it works atleast. Is there some deep difference between these two methods?
EDIT: Someone tells me that the difference is that git add * adds everything - all files, directories - that are present at a particular location, except for the files that begin with a '.'. git add ., on the other hand, even includes all the files beginning with a '.' - is this all there is to it?
One of the greatest skills from Brad is that he teach basics from understanding and not memorizing. Thanks Brad!
I have watched about 8 vids by other people that claim to be for git beginners, and was completely lost. I really like that you showed the terminal along side your code editor and then github. Finally this all made sense to me. TY so much for keeping it simple. I am hooked on your vids now.
thank you. your video is of great help. i learnt alot from it.
thank you. this was simplest and most clear video i found on youtube about git
Thank you for this. I love how it was just straight to the point without any fuss. Thank you!
Now you made my life easy bro!! Thanks for this tutorial 👏
followed every step but when it came to git push or whatever my screen doesnt display the same thing., no url codes or anything so I typed it in manually and no files appeared on my github.
need an updated tutorial as this doesnt work anymore
The video is good for someone somewhat familiar with coding but my complete beginners were very lost. Too fast and too much terminology to google so they ended up frustrated. I liked it as a refresher course
Easy to understand, and this isn't my native language, you're the best c:
To be a teacher is to make things simple enough for others to understand easily. You did that perfectly. Keep up the good work Brad
When I go through the Git Setup it asks to select an editor, and says the default VIM editor is not recommended. Which one should I choose?
Whatever is your editor of choice. Notepad++ is great, Visual Studio Code also. And lots more.
And this coming from an old unix hand who LOVED vi (original VIM).
thank you very much for teaching wanted to learn git and how git works
What's the command for local "Git bash here"? Which would be an alternative to mouse right click on the folder.
Thanks for this wonderful tutorial! I really liked the way you demonstrated GIT functionalities that are crucial for us to get started, creating and using some files. I followed every single steps, and now feel much more confident with Github!
Great tutorial as always. On the point for refresh and everything needed covered!
2019 and still awesome
2020 still awesome
2021 still awesome
2022 and still awesome
@@filiptrifunovic7763 well, it's 2021 now
Seriously I took a right decision watching the video to understand git under the hood. I used to copy paste commands on git bash without knowing the purpose of each command until i found this video. Thank you and keep posting more videos👍🏻
Awesome Explanation! We love you Brady!!
Brief list of all commands used in the video credits: @Traversy Media
git init //initializes a repository
git add // adds files to the staging area
git status // check status of working tree
git commit // commit changes to an index
git push // pushes to a remote repository
git pull // pull changes from a remote repository
git clone // copies a remote repository to current folder
git add filename.txt // adds filename.txt to staging area
git rm --cached filename.txt // removes filename.txt from the staging area
git add *.txt // adds all .txt to the staging area
git add . // adds all files to the staging area
git commit -m 'changed a file' // adds commit message
// can also create .gitignore file and add filename.txt to it to ignore filename.txt from version control
//branches - working separately from main code branches
git branch test // creates a branch called test
git checkout test // switches to test branch
// all commits will now be made to the test branch
git checkout master // switches back to master branch
git merge test // merges test branch to current branch (master)
Thank you
Excellent introduction! The best of several tutorials I've used.
Thank you! I think I actually understand it now.
Brad Git and Github demystified. Thank You
I'd been watching so many git video for beginers but only when I find this video did I can have my fist commit to my repo, thank Traversy Media very much
this is the best git tutorial I've ever watched!!!
Thank you! I’ve been reading and watching a lot on git. For some reason, I was having a hard time wrapping my head around the basics but after this video, I feel like the whole picture makes sense. Thank yo, thank you, thank you!
"Oh Jesus" @ 19:01... so funny... xD
I fast-forwarded just to hear it. Did not disappoint.
i was looking in the comments if someone pointed that out. XD
@@Hellokittyenby Same here :)))
get a life Velimir...!!!
I’ve been searching for this kinda tutorial for weeks! I hate using the GUI as I’ve got used to Linux’s CLI. Thanks for uploading! Although it’s three years old xD
Thank you very much for this great video, really helpful !
Awesome! Thank you for the Beginner Tutorials. You're the best!
I am forever grateful for your insight and knowledge. This tutorial is arguably one of the easiest ones to follow along and allowed me to feel confident enough to start using it. I can't thank you enough Brad!
This is good material! a great place to start with git
Brad the Legend, thanks for this video. And congrats for reaching the million subscribers milestone
I have a question. Why do some tutorials use "master" and others use "main" in the command "git push -u origin master"/ "git push -u origin main"??
"im on a new windows installation",
i'll let you off for not removing that cortana bar haha.
Silmply best! All things explained very well. Thank you.
Simply*
Very Straightforward.
To much Help full
Thank you Sir....... :)
"I clicked the wrong editor". No sir, that's actually the right one ;)
these are the very basic thing of Git commands,which I am now very familiar with, anyway great video for beginners
I've been trying to get my head around git using visual studio and devops and was finding everything terrifyingly vague, after learning more about the basics and using the command line I feel much more comfortable, I'm under no illusion that I am an expert and am still somewhat cautious but I am not as scared as I was or confused over what is really going on at each step, thanks a lot!!
Do you use Heroku? So you could make a video for beginner heroku/php
just out of curiosity ... github team announced that they are going to release github mobile app beta version. Does anyone installed it?
Watching this in Lockdown period of Covid-19
Gonna try my hands on now.
You're my favourite source of information on TH-cam and Udemy because you're straight to the point, give the essential information and do so in a way that is easy to remember. Keep up the great work!
Even though this video is years old all of these concepts still hold true and if you have some foundational knowledge you can definitely acheive everything shown here. This was great man, short and sweet and it gives you all the essentials. I just got into a job that involves creating content on github and this part of it I had some experience with but mostly with github desktop. I can definitely see the benefit of doing it this way as you get a more fundamental understanding of what is happening.
Wow so beautifully and simple way explained and covered almost everything in brief. Thanks for making this video
The best video on GIT basics that I have seen till now.. I was so scared when I dealt with GIT for the first time. But now it all looks so easy
amazing tutorial
hi, you added dir2 in the gitignore . why its there in remote repository?
I have the same question. Hey Brad, can you help us out?
Same question, yeah.
i see that too...
I've noticed that too. Once you track some file, .gitignore will not exclude it. Brad made a mistake when he created new branch without committing current staged .gitignore and other files. His new "login" branch didn't know anything about .gitignore and that's why he could commit .gitignored files. Once he merged "login" with master, all files were there. It's really strange and confusing... I hope I helped a bit.