Github Tutorial For Beginners - Github Basics for Mac or Windows & Source Control Basics
Skills:
Tool Use & Function Calling80%
Key Takeaways
Introduces Github and source control basics
Full Transcript
hey there today we're going to be learning about GitHub and we're also going to be learning about Source control if you guys I'm pretty sure you're sitting in one of probably three boats right now one you have no idea what GitHub is no one's talked about it you've not heard about it and I'm here to talk about it because it's really important and pretty much any professional company is going to be using GitHub or something like it and we'll expect you to know it uh or you're sitting in boat number two uh you've heard about it you know about it but you haven't learned it yet it's kind of been a black box we're going to make that an easy thing to learn today and step three you person number three you've maybe used sub subversion or CVS you know what source control is you just want to learn GitHub this might not be the tutorial for you um because I'll be getting a little bit more ground level stuff here but you'll learn it all it just might be a little bit slower paced for you so let's get into real quick what is Source control why is it important why is every employer value it uh let's say there's two people right here pretend my screen is divided here and these are two guys uh up here we have John and down here we have Bobby so let's say this is the exact same file um open on John's computer open on Bobby's computer and John edits this thing and he adds an item in here he adds An Li and he adds um sand uh now how does Bobby get that change if Bobby's already made five changes added his own stuff down here now you've got to get together and get in a room you've got to open up both copies of the file it gets messy as you can imagine in a company of 10 people it gets messy almost instantly what do you do uh another common Pro problem is uh people overriding people's stuff deleting people's stuff having to check out files there's really no clean way to do it people have to be able to work on the same files at the same time without hours and hours hour of wasted work and unnecessary communication that's where Source control came in uh what GitHub will do or git will do for you is you open a git project and that keeps track of all the changes that you make so when I make this change it knows that I've made this change and then I can at any time connect and find out anyone else's changes so let's say Bobby's added uh I forget what it is rope I don't know why you use rope if you're building the brick wall at any time I can sync up to the repository and it will pull in the fact that Bobby made and saved this change and so then I won't lose any work it'll just automatically boom boom boom throw in everyone else's changes and at the same time he can do the same thing he can sync up to the repository and get my changes every once in a while you'll get what's called a merge conflict and that's when both I have edited this line I'm going to call it uh good mortar and he's going to call this more mortar and if he saves that and then I sync up to the repository it's not going to know who's right it's just going to know I changed it and Bobby changed it so I'll get something like this depending on what kind of source control I'm using I'll get your version something that looks an output like this and it'll say it's a conflict and all a sudden I have to go okay hm one of these is the right one which one's the right one Bobby changed this I change this um oh I know what I'll do I'll go more good mortar there we go and then I'll get rid of all this junk and I'll save my file and now I had to manually merge changes that will still happen sometimes but GitHub will flag for you everything that both people have done the way to minimize having to do that cuz that is kind of a pain in the rear and there's really no way around it is to make sure you have good communication on generally who's working on what tasks and that shouldn't happen very often and when it does it shouldn't be much bigger than what I just kind of showed you right there so let's get into GitHub let's get into an actual project and how we're going to set this up and manage this uh first thing you'll need to do is you'll need to get GitHub installed on your computer and you'll need to sign up for a GitHub account so go to github.com and sign up for an account it's free um and then also go to mac. github.com or windows. github.com and install the GitHub application that will take care of everything else you need for you right there and it will give you a visual application uh which I will tell you not to use so this is the visual application it will give you it's super easy really easy to get started but a lot of employers look down on it uh because lots of people use this as a crutch instead of actually learning the command line the command line is not hard it's about five commands uh a lot of people just avoid it like the play cuz seeing a black screen freaks them out but we're going to get past that fear today and have a great time with it so uh I'm going to go ahead now and create a new repository think of repository equals project whatever uh I already did one called get tutorial as a test so new git test so I'm making a repository called new git test and the only thing I'm going to check here is initialize this repository with a read me and that allows me to clone it right away I'll show you what that means so you see it made a new repository for me called new get test I already have my first file which is called readme and all the readme has is this uh what the readme is is it's kind of any instructions you're going to give to people who use this repository it's automatically displayed when you open up the repository so all I'm going to do here is I'm going to copy this clone URL this is what I will use to get it on my machine okay that's all I need to do for GitHub so now I'm going to use yes the dreaded command line lots of you guys have been avoiding this uh because you're terrified of it you don't know what to do with it and uh we're going to get into this today so uh if you're on Mac you only need to know like three commands to actually use this thing and then github's five commands uh and if you're on Windows same thing uh to open it with Mac you go to utilities applications utilities terminal and then to open it on Windows you're going to go run and type CMD and hit enter so basically CD uh is your change directory command so if I go CD dot dot I'm going to go up a directory I just went from documents into wheels so now I can go CD back into documents there we go I can also go CD dot dot now I'm in users I can go CD will documents and now that's basically CD that's your first command and the other one is going to be LS and that'll show you a listing of all the files in your directory if you're on Windows it's going to be dir unless you have fake Linux Mac commands installed so you can see I have a few files in my documents thing not much uh what I'm going to do is I want to put the repository in documents so I'm going to go get clone and I'm going to paste that URL that I copied clone is your first get command what that does is it takes that repository and it copies the whole thing down and puts it in a folder called its name by its name so now if I hit LS you can see that I have a folder called new get test so CD new get test and LS I've got readme.md that's my only file okay that's about all I'm going to do for for now let me go ahead and add that folder to my project here and new get test there we go so now I've got my folder and I can do away with you you're not necessary anymore actually I'll wait for a second and when I'm going to do down here is let's say John Bob does the same thing he's going to go get clone not readme MD this URL John is also working on our project so he also is going to clone it you notice I've cloned it into a different folder so you can actually have the same folder on your computer in 20 different places and this one's in my GitHub folder there we go so now we both have the repository here and I'm going to go ahead over here on the top and I'm going to make a new file I'm going to save it as new get test we'll call it index.html and let's make something here real quick let's make our first list here we'll just kind of recreate what we had bricks bricks and Mort let's just make it a list of two items I'll save it and you notice I got index.html there and John still doesn't have anything cuz he's not he's just working on his own let me go ahead and I'll make a new file here for John and we'll call it index 2html and we just make it we'll just do this UL we'll just leave it like that so John's got index to I've got index and we're both working on the project and that's all the progress we've made so here are you ready here's we've got our first get command which is get clone that's going to pull any repository in using its URL our next get command is get status so this is going to show us what's different between us and GitHub up in the sky right now so all that's different now is there's an untracked file we have created a file called index.html GitHub has no clue that this file exists so what I'm going to do right now is I'm going to do get add which means we're going to add any change or any new files or whatever by name so add index.html so now we've said okay put this guy into our project if I do get status again you'll notice that it's now a change to be committed we have a new file index.html so now all I have to do is I've added it I can go get commit which means I'm locking it in to the repository get commit m-m means I'm giving it a message message and the message is going to be in quotes added index.html there we go so now it's committed but it's still on my machine it's locked into the repository but it's not synced up to github.com yet so all we have to do to get it to do a sync is get push that's going to take anything on our machine and push it up to github.com so now if I go to github.com and I refresh you'll notice I have index.html so there we go now it's up there I'm go and hide this and so now if this guy here goes get pull which is so push pushes up to github.com and pull is going to pull down from github.com whoops I'm not in the right directory cdspace new G test get pull these commands will only work when you're in the directory of your GitHub repository because you can have a hundred different repositories on your computer so I did a get pull and you see it pulled in index.html now I've got them both so now what John's going to do is John's got this guy and I'm also going to add an item to my list here sand so now if I do get status I see two things I've modified index.html and I have an untracked file myself so I can do get add index.html and you'll see that now if I do get status the changes for commit are that I've modified this guy o sorry wrong one changes to be committed that I've modified this and I still have an untracked file that's not ready to be committed so I can do get add index 2 another thing you can do is you can do get add dot which is going to do everything in your directory or you can do GI add- capital A which is going to do get add all so I'm going to do get add a and now if I do get status you see that I've got two files ready to go one that's modified one that's brand new and I'm going to do a terribly generic get commit which is a bad idea made changes that's not useful to anyone but oh well so I've added committed I'm going to push and now over here I'm going to pull get pull but before I yeah so get pull there we go and so now I've noticed I've got index two and my index One automatically has all the updated changes if five different people were working on these files and I did a pull it'd get everybody's changes as long as they pushed them up so that's kind of how it works you'll notice the commands aren't too bad so far we've got get status get add get commit get push get pull and that's kind of your Basics into GitHub there's about 10 commands in total if I just type get it'll show me kind of all the commands that I can use and kind of what they do um and that's pretty much the beginning of GitHub so let's talk about a little bit about workflow how do you actually do this so one thing I'll do is when I come in at the beginning of each day I'm going to start off by doing a get poll want to make sure I get everybody's updates from all you know last night the rest of the day hey already up to date great I'm going to make my changes da da da da this isn't mortar anymore it's now called I don't know something else quick create I think that's how you spell it made that change um and so now I'm ready to push my changes up I'm going to add everything made Mt more specific got it got all my changes done I'm ready to sync up all my work to the repository I'll do this with every kind of incremental piece of work I do I will probably add commits all throughout the day and then every few hours in the day I'm going to make sure I'm in sync to make sure I don't get way far far off of stuff let's create what's called a merge conflict here instead of mortar I'm going to put I'm going to change this to more mortar I think we already went through that example so get add a get commit let's say down here at the bottom what's this guy's name again Bobby Bobby just made a change on a line that I made a change on um and so now when I do a get pull ah it says conflict merge conflict in index.html you have to fix the conflicts and then commit the result basically you've both changed these lines and at first this looks like crazy freaking out ah what the heck do I do with this all it's telling me is is head which is what I'm on we made this change to this line and somebody else made this change so what do we do about it I'm not smart enough to know you've got to figure this out it's not too bad I just look at the two lines and say ah okay he was adding more which is our company's way of saying we need to get more than one so I'm just going to do more quick CR I'm going to kind of manually merge those lines together or I'm going to just say no quick create is the right line he didn't really know what he was talking about we don't ever say more anyway I manually make the decision I delete all the helper things that it gave me save my file and now I just hit get commit with nothing in there whoops get add a get commit forgot to add it you notice it said okay now it's continuing my merge branch of Master and by the way if you ever accidentally hit commit without a message or anything you'll get this screen you won't figure out how to get out of it you hit Escape colon WQ to save it Escape colon WQ there you go merge Branch Master yes Escape colon WQ is the most complicated part of everything we're going to learn today just write that one down it takes a long time and I'm always forgetting it Escape colon WQ is how you get out of a full-blown commit I'll show you real quick just what that was so let's say I made a change now I can modified index get add a it's commit if you ever just hit commit without the dasm it's going to open up this same thing it's for a full-blown message is what it is it's for a multi-line message there you go so that's kind of what that was it was like a multi-line commit message once again Escape colon WQ enter and there you go get push and now he can do a get poll he can find find out that I've deleted that line there you go and that is your intro to GitHub once again get commit get add a get push get pull that's about it have a great day
Original Description
Github Tutorial For Beginners - learn Github for Mac or Github for windows
If you've been wanting to learn Github, now's the perfect time! Github is seen as a big requirement by most employers these days and is very critical to business workflow. This Github tutorial will cover the basics of how to use Github and the command line.
Lesson #2: Pull requests, Branching merging
https://www.youtube.com/watch?v=oFYyTZwMyAg
Other Videos:
jQuery rapid-learning Course
https://www.youtube.com/watch?v=hMxGhHNOkCU
-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
https://www.youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from LearnCode.academy · LearnCode.academy · 8 of 60
1
2
3
4
5
6
7
▶
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Web Development Tutorial for Beginners (#1) - How to build webpages with HTML, CSS, Javascript
LearnCode.academy
Web Development Tutorial for Beginners (#2) - Basic CSS - How to build a website with HTML & CSS
LearnCode.academy
How to create CSS Layouts - Web Development Tutorial for Beginners (#3) - with HTML & CSS
LearnCode.academy
Bootstrap Tutorial For Beginners - Responsive Design with Bootstrap 3 - Responsive HTML, CSS
LearnCode.academy
Angularjs Tutorial for Beginners - learn Angular.js using UI-Router
LearnCode.academy
CSS Tutorial - Web Development Tutorial for Beginners (#5)
LearnCode.academy
Node.js tutorial for beginners - an introduction to Node.js with Express.js
LearnCode.academy
Github Tutorial For Beginners - Github Basics for Mac or Windows & Source Control Basics
LearnCode.academy
Javascript Tutorial - Programming Tutorial for Beginners Pt 1
LearnCode.academy
Javascript Tutorial - jQuery Tutorial for Beginners Pt 2
LearnCode.academy
AngularJS Directives Tutorial - Part 1 - Demystifying Angular Directives
LearnCode.academy
WATCH THIS IF YOU WANT TO BECOME A WEB DEVELOPER! - Web Development Career advice
LearnCode.academy
YEOMAN TUTORIAL - Master Front-End Workflow with Yeoman, Grunt and Bower
LearnCode.academy
BOWER! - Streamline Web Workflow with Bower Package Manager
LearnCode.academy
Chrome DevTools for CSS - Better CSS Coding & CSS Debugging with Developer Tools
LearnCode.academy
GITHUB ATOM - Why Atom.io will be your favorite Text Editor!
LearnCode.academy
GITHUB PULL REQUEST, Branching, Merging & Team Workflow
LearnCode.academy
Pimp that Terminal - Add shortcuts and functions to your .bash_profile to simplify routine tasks
LearnCode.academy
jQuery Tutorial #3 - Writing Smarter, Better Code - jQuery Tutorial for Beginners
LearnCode.academy
jQuery Tutorial #2 - Event Binding - jQuery Tutorial for Beginners
LearnCode.academy
jQuery Tutorial #1 - jQuery Tutorial for Beginners
LearnCode.academy
Node.js MongoDB Tutorial using Mongoose
LearnCode.academy
Node.js tutorial for beginners 2014 - an introduction to Node.js with Express.js
LearnCode.academy
WEB DEVELOPMENT - SECRETS TO STARTING A CAREER in the Web Development Industry
LearnCode.academy
jQuery Tutorial #4 - DOM Traversal with jQuery
LearnCode.academy
jQuery Tutorial #5 - Building a jQuery Tab Panel Widget
LearnCode.academy
jQuery Tutorial #6 - Building a jQuery Image Slider
LearnCode.academy
jQuery Ajax Tutorial #1 - Using AJAX & API's (jQuery Tutorial #7)
LearnCode.academy
jQuery Ajax Tutorial #2 - Posting data to backend (jQuery tutorial #8)
LearnCode.academy
jQuery Ajax Tutorial #3 - Delegating Events & Mustache.js Templating (jQuery tutorial #9)
LearnCode.academy
jQuery Ajax Tutorial #4 - "Edit" modes & Better Mustache.js Templating (jQuery tutorial #9)
LearnCode.academy
How to put your website online - how to FTP to a domain & upload files to a webhost
LearnCode.academy
Basic Terminal Usage - Cheat Sheet to make the command line EASY
LearnCode.academy
SSH Tutorial - Basic server administration with SSH
LearnCode.academy
Vagrant Tutorial - Running a VM For Your Local Development Environment
LearnCode.academy
Sublime Text Favorite Packages and Workflow
LearnCode.academy
What Makes Javascript Weird...and AWESOME - Pt 1
LearnCode.academy
Javascript is Event-Driven - What makes Javascript Weird...and Awesome Pt 2
LearnCode.academy
Javascript Closures Tutorial - What makes Javascript Weird...and Awesome Pt 3
LearnCode.academy
FREE REST API - Practice Developing Javascript AJAX Apps with this API
LearnCode.academy
Javascript Scope Tutorial - What Makes Javascript Weird...and Awesome Pt 4
LearnCode.academy
Javascript Context Tutorial - What makes Javascript Weird...and Awesome Pt5
LearnCode.academy
Nginx Tutorial - Proxy to Express Application, Load Balancer, Static Cache Files
LearnCode.academy
Live Reload Sublime, Chrome, Anything - Fast and easy with Live-Server
LearnCode.academy
Are you bad, good, better or best with Async JS? JS Tutorial: Callbacks, Promises, Generators
LearnCode.academy
Javascript Generators - THEY CHANGE EVERYTHING - ES6 Generators Harmony Generators
LearnCode.academy
Web Development Advice - Interview with Dev Tips
LearnCode.academy
How the Internet Works for Developers - Pt 2 - Servers & Scaling
LearnCode.academy
How the Internet Works for Developers - Pt 1 - Overview & Frontend
LearnCode.academy
HAPROXY vs NGINX - 10,000 requests while killing servers
LearnCode.academy
Node.js Cluster - Boost Node App Performance & Stability with Clustering
LearnCode.academy
Web Dev Training with Treehouse
LearnCode.academy
What is Node.js Exactly? - a beginners introduction to Nodejs
LearnCode.academy
How to deploy node.js applications #1 - spin up a server
LearnCode.academy
Deploying node.js applications #2 - provision server & setup flightplan
LearnCode.academy
Deploying Node.js Applications - Deploy Node the right way - as an Upstart Service
LearnCode.academy
Mobile Web Design - Coding Workflow For Mobile Websites
LearnCode.academy
WHY YOU NEED A BUILD SYSTEM LIKE GRUNT, GULP, BRUNCH FOR YOUR WEBSITE
LearnCode.academy
GRUNT TUTORIAL - Grunt makes your web development better!
LearnCode.academy
STOP USING FTP! - How to Deploy with Flightplan over SSH
LearnCode.academy
More on: Tool Use & Function Calling
View skill →Related Reads
📰
📰
📰
📰
Nomad AI Review 2026: Can This AI-Powered Travel Platform Help You Build an Online Business?
Medium · AI
The Only 4 Claude Prompts I Use Every Single Day
Medium · Programming
The Most Valuable Way to Use AI in Your Business Is Also the Most Boring
Medium · AI
ccpool helps you save $100 a month on claude usage
Dev.to · salah zeghdani
🎓
Tutor Explanation
DeepCamp AI