Working With Git Repository | Eduardo Robles | Skillshare
Drawer
Search

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Working With Git Repository

teacher avatar Eduardo Robles

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Working with Git Repository

      2:08

    • 2.

      Terminal Basics - Lesson 1

      4:44

    • 3.

      Create a local Git Repository - Lesson 2

      2:24

    • 4.

      Add a new file to Git repository - Lesson 3

      1:46

    • 5.

      Make Git keep track of your files - Lesson 4

      2:41

    • 6.

      Find the Status of your Git repository - Lesson 5

      3:42

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

325

Students

2

Projects

About This Class

Git is a great tool for developers to learn. It has so many features though, it can be daunting to learn the entirety of it. Luckily, the best way to learn Git is to practice with working with your own local development environment. You may not be using a version control system to keep track of changes to your code. Git can help with that even on your local development environment. If you learn these 4 basic commands you will have a good foundation to work with more complex development workflows.

In this class you will creating a local Git repository and learning how to use Git to track changes to files. If you can master working with your local repository you will prepared to work with remote repositories. This class is geared towards those who want to get started with Git and have some experience with using the terminal. The skills you will be learning in this class are important because most professional development environments have some form of version control system for maintaining their code. Knowing how to work with Git can give you the leg up in the professional programming world.

Meet Your Teacher

Hi, I'm Eduardo

I've been using Linux for 12+ yrs and I'm good at solving problems, especially technical ones. I love volunteering my time to help teach others about Linux and Open Source software. I am the founder of the South Texas Linux User Group and have proudly gone to Texas Linux Fest for several years now.

See full profile

Related Skills

Development Web Development
Level: Beginner

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Working with Git Repository: I've been using the mix for about 12 years now, and I think I'm pretty good at solving problems, especially technical ones. I love volunteering my time to help teach others about Lennox and open source, which is why I decided to create this class. Working with get repository Get is a great tool for developers to learn. It has so many features. Oh, it could be daunting to learn the entirety of it. Luckily, the best way to learn is to practice with working with their own local development environment. You may not be using a version control system to keep track of changes to your coat. It can help you with that, even on your local development environment. If you learn these four basic commands, you will have a good foundation to work with more complex development work clothes. In this class, you'll be creating a local git repository learning how to use Get to track changes to files . If you can. Master, working with their local repository will be prepared to tow work with remote repositories. This class is geared towards those who want to get started with git and having some experience with using the terminal the skills you will be learning in this class are important because most professional development environments have some former version control from maintaining their coat, knowing how to work with get to need me the leg up in the professional programming world as far as your class project, you gonna try toe create your own local gift boss story by using the core commands that we covered in the class. Afterwards, you can share a screenshot of the terminal showing the output of your get status in the project gallery. This way we can all encourage each other to see how well we're progressing that keep predictions class. And if you have any feedback, please let me know. Thanks. 2. Terminal Basics - Lesson 1: Hi there. And welcome to working with git Repository. Lesson one, terminal basics. So in this lesson is a very good and quick lesson. We're basically be teaching you four basic commands. And the reason you need to know these four basic commands is because you're going to be working inside the terminal out when you're working with Kit. So you want to learn how first created directory Second, how to move into that empty directory and then create a empty file for, you know, for in this example, in this class, we're gonna be learning how to create a read me file so we wouldn't be able to create that empty file. And then you're gonna be able to basically list all the files inside your directory, and that's very handy for you. Want to see what's inside your directory? You'll be able to do all of this inside the direct inside Thea Terminal. Excuse me. So is going to start burning those four basic commands so that you can get started. So the 1st 1 is M. K D. I R 10-K d ir and then space. And then what this Command is gonna do is gonna create an empty directory. So you do type in an kidney IR space and then the name of the directory and the UNIX and Lennox World. A directory is basically like a folder. So what? What do we want to name this folder in this example? We're gonna go ahead and just name it live demo. So it's not gonna give you any like, um, feedback or any prompts or anything that telling you that you're successful in creating your directory. So how do you know whether or not you created that directory? Well, then that's where the L s command comes in. The list files command. So if you type ls and you take nothing, ls And it's going to show you right there, you can see we have that directory created live demo, and then we'll we can also see that we have other directories in here as well. So we've already used to commands and k d. A. R, which creates a directory and in ls which list files and directories. So now we want to move into our recently created directory, so we easily do that with CD. And then, of course, the name of the directory. A little tip. Ah, if you want to spell out the whole thing like, for example, if you're if you're at this point, you could easily hit Tab and the terminal will complete it for you so you can easily start moving forward, going to hit, enter. And then you could see now that we went from being in the skill shares directory to now being in the live demo directory. So that's a way of knowing so again, if you want to see what's inside this directory, of course, that empty. But if if there was other files in there, you can just use LS and I'll show you. Of course they didn't show us anything because it's empty. So now we have learned three commands we have Learned and K d. A R, which creates a directory. Ls which List Files and Directories CD, which changes directories, which moves into a territory or out of a directory. Let's quickly show you how to move out of this directory. CD dot DOT moves you up SUV to directories. So the current directory and then back to whatever director you were in. So that's why it's moving you twice so it's going to move back into the director and there we go. So you see how easy that was. It's a matter of just easily typing in, you know, the command and whatever director you want to move into or, you know, just to ah ah, periods. And then we'll move you out of that directory. So finally, the last command we're gonna be learning here is touch. What touch does is basically just it's a quick way of creating an empty file. Now, if you're working in Windows disk a man does not work in there. So this is mainly a UNIX Olynyk stop of command. So basically, all we have to do is just to touch and the name of the file. In this case, we're gonna create a read meat, got empty file. So again, it doesn't prompt you with anything. It doesn't show you that he created it or any of that. It just scored, goes ahead and returned you back to your prompt. So again, how do you find if how do you find out if you have that fell in their simple Unless and there we go, we can see that we created that read me file. So that's it. You know, you basically learned for the four basic commands that you basically need to start working within your local empty get directory. So again, it's an k d a R. To create in your directory. Ls to list any files or directories CD to change a directory, basically moving into directory or out of a directory, and finally touch, which creates an empty file. So with that now, with you having grasp of these four commands, you can basically move into the next lesson, which will start creating an empty get directory. 3. Create a local Git Repository - Lesson 2: Okay, welcome back to lesson to and this lesson will basically be learning how to initialize an empty get repository. So we're gonna basically learn how toe basic, create it. Git repository A local one so you can start working with git. It's very straightforward, very simple. It's simply one command to get you started. What you want to do is you want to make sure that you're inside the directory that you want to use Get inside. So right now we're in the projects slash skill Shared directory. We want to move into the directory recreated in the last video live demo. So we do that with the command we learn previously CD live demo. Now we're inside that directory. So this is the command. This is the one simple command that you need to basically create an empty git repository and it's get and it and that's it. So you enter and I'll tell you initialized empty, give repository in and then I'll show you, You know, the directory that you're in. So this little get folder is a hidden folder hit in directory. And so if you want to see that real quick just ls dash a we'll show you that right there. So if you do, just ls it won't show it to you. But if you do dash A, it will. The dash is a flag to show any hidden files. So there you go. So this is basically all you need to know to basically start working with Kit now, basically what we just did with get in it. This command, basically, all we did was to tell get Hey, this is a directory that I want to now be a repository. So go ahead. And now start tracking whatever changes been inside this directory. So that's what get Did initial left an empty get ripples story. So that's all you need to start working on your local git repository in the next video. We're going to show you how to basically, um, start adding files to get to track, so that's gonna be the next step. So go ahead and go into the next video so you can look at how to get start how to get started with tracking files inside it. Get 4. Add a new file to Git repository - Lesson 3: Okay. What? Come to lessen three, we're gonna adding you found toe the empty git repository we created in the last video. So just to make things a little bit more clearer and to speed things up, we're gonna go ahead and use that reading the file that were created in the first video So you can add any any any number of files or directories to your empty get directory to So that kid contort tracking them. But we're gonna going to start with that one file just so that things are a little easier. You can see how easy it is to add and you filed to get to so I could start tracking it. So the command we're gonna be doing is get ad and then the name of the file or directory that we want to add. So it's really simple. So again. So we're inside our live to write life demo. Excuse me? Directory. If we do ls it shows that we have that one file under the read me dot MD file. So we're gonna go ahead and to get ad read me that empty, and it's all we have to type in and then enter, and that's it. So now basically get now knows to basically add that file to tracking. So in the next step, we're gonna learn how to basically tell git to make sure that those changes, whatever changes you made to read me foul, are being tracked. Because right now all we told get to do is to keep an eye on it. Keep an eye on that file and make sure that it's added to my get repulsed work. So it's just keeping an eye for it. And the next step, we're gonna learn how to make sure that git knows that changes have been made to that really vile. So let's go ahead and go to the next video. 5. Make Git keep track of your files - Lesson 4: All right, Welcome to lessen. For in the previous lesson, we learned how to add a new file or directory. Teoh are get repository to basically tell it to make keep track of changes to a specific file. So now we want to make sure that get knows that we made those changes to the foul and to ensure that there's a history of those changes. So that's what the get command comes in plate. So we're going to use to get commend, get commit command to let get track the changes to our read me file that we created earlier . So in order to do that is really simple eso we're gonna type in, get commit, let me get commit, Dash M. And this desk M is basically a flag telling Get to add a message to this commit. So when you do the double quotes there and they were gonna add a message in between those quotes So I guess we could just do initial comment. So and then we're gonna hit return and there we go. It's gonna prompt us with some feedback and basically say master route commit and there's gonna give you a tag for that commit. And then obviously the the messages that we added touch to it and it's a one file changed zero assertions, zero deletions create mode and then a little tact for that. So basically what we've basically done now is that we ensured that get knows that we made changes to that file and is keeping a track. Is keeping a history of those changes s so that's why it's when you're working on a local repository. It's a good idea to commit often eso this way. You know how many changes you made to a single file, and you can keep track of those changes. So then you can later on, when we learn how to basically revert those changes, you can easily go back to them by knowing either the message you left there or basically the little tags that are here. Eso is very simple, very straightforward to basically start making sure that get has kept track of those changes to a file. So in this lesson again, we learn how to basically use get to keep, keep track off changes to a specific file. So in the next lesson, we're gonna learn how to basically show us the status of your git repository. It's always good to know the status of the git repository because you want to know whether or not there is changes that have not been changed a tract or if you need to commit something, or if you need to add some new files to you, get repository. So that's why it's very important to learn that so it's going jump into the next lesson. 6. Find the Status of your Git repository - Lesson 5: already. Welcome to lessen five. We're gonna find the status of your git repository. So basically, we're going to use to command get status to see the status of your local repository. So it's always good to do this often as well to make sure that you know, uh, how your repository the status it's in. Sometimes you may not realize that you have some files that are not committed and that it has not kept track of you may have added them, but you have not committed them. So you want to make sure that most of your files are committed often, especially when working in your local git repository, so that you have a good history of the changes to those files. So in order to do that, it's a very simple command which is get status. Enter an Osho is on Branch Master. Nothing to commit working clean treat. So that is a good status, Um, a prompt, basically telling us that everything's up to date and there's nothing that you've got to commit and, uh, is basically has tracked everything. All your changes up to this point. So basically, we've gone through this whole little course and we've shown you how to basically create a empty git repository. Had a file to get Sochi, start tracking it, and then how to make sure that get a nose, the changes you made to that file and so you can create a history of those changes. Do you get replies story. And finally, we've shown you how to basically get the status of your get repository. So again, it's always good to know that working with to learn how to work with the local git repository before you start working with the remote one. Because if you have a good grasp of working with their local one, it's gonna be much easier for when you're working with the remote one, Um, and all the concepts of the same when you're working with local one or what they've remote one. But there's some things that you may want to do a bit more often were working when your local directory, for example, you want to make sure that you commit more often so that you know what kind of changes are being made to your files and so that you can keep track of those changes, too, because sometimes you may want to revert a certain change, and that change may have been a few months ago. So it's quite simple with get to understand on to go back to those changes. If you know the date Oh, are you can maybe give it a couple parameters. Eso You can figure out how to basically go back to those changes, so that would basically conclude the end of this class. There is a class project available for you guys, and it's very simple or would basically go over the same commands that we went over in these videos. And you can easily get started with your own local git repositories if you follow along with the the Class project, and I encourage you all to fall along with the class project and to basically show us your results, go ahead and show us your results of your class project so we can all see and we can encourage one another to, ah, basically continue one learning git. And I know it's a It's a very cool thing to learn get, And it's very useful nowadays for a lot of programmers and a lot of people in the Dev Ops kind of environments as well. So go ahead and follow along with the class project. And I wish you guys luck with that. And if you have any questions, feel free to ask me if you have a near the thoughts people feel for it asked me as well, so thank you Won't and continue on with the class project.