Python for Entrepreneurs Transcripts
Chapter: Source Control and Git
Lecture: First time git configuration

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Now that we've downloaded and installed Git,
0:02 we just need to perform a few first-time setup commands,
0:05 in order to get things up and running.
0:07 Now you only need to run these commands once,
0:10 so just keep that in mind, you don't need to do this every time you start out Git.
0:14 Back in the terminal, we can now work with Git.
0:17 Let's run our first set of commands,
0:19 now we are going to use the "git config" command, there is a whole lot of options here,
0:24 we are really just going to run four commands.
0:27 The first thing we want to do is set up our username,
0:31 this is how it is going to identify us, who we are, this is our natural name.
0:35 So we'll type "git config" and we'll give it the --global,
0:40 we're saying we're setting this up for all of Git on our system,
0:43 not just for a single project.
0:45 So "git config --global"
0:49 and I am just going to give it my normal human name, Matt Makai.
0:55 Now if you don't get any output back, that's good,
0:57 that means that everything went smoothly.
1:00 With the next command, we are going to set up our user email address,
1:04 now this is super helpful when for example we commit code
1:08 and we are working on a large project, we are working on an open source project,
1:11 maybe with people we don't necessarily know
1:13 and then they need to get in contact with us.
1:16 Now on our own businesses that may not be a big deal,
1:19 but if you hire contractors, you are going to want to know
1:22 who you should contact in case anything goes wrong.
1:25 So for this we are going to say "git config --global" again, "user"
1:29 and instead of name we are going to say "".
1:32 And in my case, this is just
1:37 Now again, no output is good, that means it's saved properly.
1:41 And we'll check it in just a moment;
1:42 now the third thing we want to run, and this is optional,
1:46 but I always set this, I set my editor,
1:50 now by default, typically Nano is the editor that pops up, but I use Vim.
1:55 And again, if you are using Sublime Text, what you can do on your own system is
1:59 set the path to the executable, so a little pop up with the Sublime Text editor
2:03 whenever you need to commit some text
2:07 or you need to write some text that Git will interpret.
2:10 We'll get into that a little bit later, but for right now,
2:12 we can set this up by saying "git config" again, "--global core.editor",
2:18 and in my case again, I am going to press specify "vim".
2:22 OK, so we've got our three things set,
2:25 we just want to double check that we've set them properly,
2:27 we can say "git config" and then just list out.
2:31 Now in my case, is Matt Makai,
2:35 is, and my core editor is Vim.
2:41 Obviously your setting is going to be depending upon what you set,
2:44 and again if it's a little bit confusing at this point, you don't have to worry about the editor,
2:48 but you should go ahead and set and
2:51 With those few settings out of the way,
2:53 we're ready to get started and dive into using Git.